-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG/ENH: should idxmax/idxmin work on object types? #4279
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
yep...related is #4147, should prob work could prob support a what do you think? |
Yeah, I found _get_numeric_data looking at quantiles. Didn't want to point people to the private method but would make an easy PR. |
yep...have the |
Might be nice to also support this for objects at some point. I'm pretty sure there's a deterministic ordering for objects in Python 2/3, maybe using |
yep...see issue #4147, this is actually currently a numpy bug (works for max but not for min, when having |
numeric_only=True
flag tomin,max,idxmax,idxmin
to select out numeric onlyidxmax
on object dtypes (related to BUG: min on non-numeric data with nans #4147)related is #6287
Just happened to come across this. Related to #2982
This is fine (I was surprised it worked for objects)
This falls down
I'd be fine if there's a strong performance reason not to support this, though it would be nice to not return an error at least. Maybe a stop-gap solution is to only return a solution for numeric types similar to the quantiles method.
The text was updated successfully, but these errors were encountered: