Skip to content

Conversation

@windiana42
Copy link
Contributor

This PR is supposed to fix #228

@windiana42
Copy link
Contributor Author

@yehoshuadimarsky The main purpose of this PR is just one change in main.py. However, I had to change more to fix CI. I hope this is fine.

I chose to fix Self-Signed-Certificate issues by using encrypt=no whenever connecting to mssql container during tests. Testing encrypted communication might also be valuable, but this is harder to configure correctly.

copy(col)
)
for col, dtype in df.dtypes[
(df.dtypes == "bool[pyarrow]") | (df.dtypes == "bool") | (df.dtypes == "boolean")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the most ergonomic way of comparing dtypes in pandas? 🤔 haven't used pandas in a while 👀

Copy link
Contributor Author

@windiana42 windiana42 Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "==" operator for pandas dtypes does quite some magic. That is why it cannot be replaced with "in". I was hoping that it actually knows a generic "bool" which matches to all types of booleans. However, the nullable boolean is actually called "boolean" and not "bool[python]".

Copy link
Collaborator

@borchero borchero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable to me, thanks :) is there a low-effort way to write a test for this?

Comment on lines +444 to +445
# attention: the `(lambda col: lambda...)(copy(col))` part looks odd but is
# needed to ensure loop iterations create lambdas working on different columns.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this comment

Suggested change
# attention: the `(lambda col: lambda...)(copy(col))` part looks odd but is
# needed to ensure loop iterations create lambdas working on different columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pandas columns with ArrowDtype pyarrow.bool_() fail with bcpandas

2 participants