Skip to content

BUG/ENH: should idxmax/idxmin work on object types? #4279

Closed
@jseabold

Description

@jseabold

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

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions