Skip to content

Series idxmin() TypeError?Need change type to 'float' #41696

Closed
@rICHi97

Description

@rICHi97

i'm using idxmin() on a series, which is like:

    ltc: 
    调度报障工单号
    DD182103227    5
                  ..
    DD082104265    5
    Name: 供电所, Length: 848, dtype: Int64

However, when using:
ltc.idxmin()

i got an error:
TypeError: argmin() takes 1 positional argument but 2 were given

when using:
ltc.astype('float').idxmin()

i got the right answer:
'DD092104104'

But the api doesn't say that idxmin() can only use on float data.Why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions