New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix .loc of dataframe with nullable boolean dtype #8368
Fix .loc of dataframe with nullable boolean dtype #8368
Conversation
Can one of the admins verify this patch? |
add to allowlist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pushing this change so quickly. It looks like this doesn't quite work with older versions of pandas. I think you can use is_bool_dtype
like we do in
Line 2568 in 11f52ed
if is_bool_dtype(data._meta): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sticking with this @m-rossi!
I use the Nullable Boolean data type with Dask. It worked fine since the recent version
2021.11.0
. Let me show an example:While this indexing
works fine, this indexing
fails with the following error
This PR adds the
pd.BooleanDtype()
to list of boolean-dask Series and adds a test which fails before my code changes.pre-commit run --all-files