-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DTYPE: use a Categorical for bool dtypes #15888
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
Comments
Nice idea, xref #15751 - I was sort of backing into the same concept |
Not sure that will work with boolean indexing |
It works, but would need some internal modifications to make this compat
|
I think you are using the wrong indexer (
does not work as you want (this should actually raise I think because you shouldn't do boolean indexing with NaN values) |
Sorry, I was confused myself, of course something like |
@jorisvandenbossche yeah not saying this should work when there are NaN's embedded anyhow :) but yes this works now
Though I think we should actualy have a
|
This is related to the not having |
Given that we now have a BooleanDtype that supports missing values (although with another approach of an additional mask instead of -1 for the missing values), I don't think this is still something we want to pursue? |
yeah this is not necessary anymore, though it’s slightly more efficient in memory compared to the current (and future implementation with a bit mask) but not worth the effort |
this may seem counter intutive, but this would allow us to store nulls as well (efficiently, rather than as
object
dtype), or casting to floats.I am sure if this would really be possible w/o some API breaks, so will have a look.
The text was updated successfully, but these errors were encountered: