Table Of Contents

Search

Enter search terms or a module, class or function name.

pandas.Series.argmax

Series.argmax(axis=None, skipna=True, *args, **kwargs)[source]

‘argmax’ is deprecated, use ‘idxmax’ instead. The behavior of ‘argmax’ will be corrected to return the positional maximum in the future. Use ‘series.values.argmax’ to get the position of the maximum now.

Index label of the first occurrence of maximum of values.

Parameters:

skipna : boolean, default True

Exclude NA/null values. If the entire Series is NA, the result will be NA.

Returns:

idxmax : Index of maximum of values

Raises:

ValueError

  • If the Series is empty

Notes

This method is the Series version of ndarray.argmax. This method returns the label of the maximum, while ndarray.argmax returns the position. To get the position, use series.values.argmax().

Scroll To Top