-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsEnhancementReduction Operationssum, mean, min, max, etc.sum, mean, min, max, etc.
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)
df.max()
This falls down
df.idxmax()
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.
Metadata
Metadata
Assignees
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsEnhancementReduction Operationssum, mean, min, max, etc.sum, mean, min, max, etc.