argmin/argmax, idxmin/idxmax and datetime64 · Issue #2982 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@lodagro

Description

@lodagro

In [65]: s Out[65]: a 2013-01-02 00:00:00 b 2013-01-03 00:00:00 c 2013-01-04 00:00:00 d 2013-01-05 00:00:00 e NaT dtype: datetime64[ns]

In [66]: s.argmin() Out[66]: 4

In [67]: s.idxmin()

TypeError Traceback (most recent call last) ... TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'

In [68]: s.argmax() Out[68]: 3

In [69]: s.idxmax()

TypeError Traceback (most recent call last) ... TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'