-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix qcut for nullable integers #31440
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
Conversation
doc/source/whatsnew/v1.1.0.rst
Outdated
- | ||
- | ||
|
||
- Bug where :meth:`qcut` would raise when passed a nullable integer. (:issue:`31389`) |
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.
I think this can go in the 1.0.1 whatsnew now that it's been created.
Don't want this to raise with "unlucky" test data that doesn't have high enough cardinality
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.
ping on green.
pls merge master as well |
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.
lgtm. can you move the comments, ping on green.
pandas/core/reshape/tile.py
Outdated
@@ -203,16 +203,13 @@ def cut( | |||
# NOTE: this binning code is changed a bit from histogram for var(x) == 0 | |||
|
|||
# for handling the cut for datetime and timedelta objects |
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.
ok, can you move all of these comments inside _coerce_to_type
great long on green |
@jreback All green, thanks for the review |
thanks @dsaxton |
Co-authored-by: Daniel Saxton <[email protected]>
black pandas
Related to #31389 but doesn't close any issues that I'm aware of. Seems the problems were indexing into a numpy array with a BooleanArray and using searchsorted in the presence of pd.NA.