pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
BUG/ENH: should idxmax/idxmin work on object types? #4279
Description
numeric_only=True
flag tomin,max,idxmax,idxmin
to select out numeric only- fix
idxmax
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
df = pd.DataFrame([["zimm", 2.5],["biff", 1.],["bid", 12.]])
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.