Series.argmin(axis=0, skipna=True, *args, **kwargs)[source]

Return the row label of the minimum value.

Deprecated since version 0.21.0.

The current behaviour of ‘Series.argmin’ is deprecated, use ‘idxmin’ instead. The behavior of ‘argmin’ will be corrected to return the positional minimum in the future. For now, use ‘series.values.argmin’ or ‘np.argmin(np.array(values))’ to get the position of the minimum row.

If multiple values equal the minimum, the first row label with that value is returned.

skipna : boolean, default True

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

axis : int, default 0

For compatibility with DataFrame.idxmin. Redundant for application on Series.

*args, **kwargs

Additional keywords have no effect but might be accepted for compatibility with NumPy.

idxmin : Index of minimum of values.

If the Series is empty.

See also

Return indices of the minimum values along the given axis.
Return index of first occurrence of minimum over requested axis.
Return index label of the first occurrence of maximum of values.


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


>>> s = pd.Series(data=[1, None, 4, 1],
...               index=['A' ,'B' ,'C' ,'D'])
>>> s
A    1.0
B    NaN
C    4.0
D    1.0
dtype: float64
>>> s.idxmin()

If skipna is False and there is an NA value in the data, the function returns nan.

>>> s.idxmin(skipna=False)
Scroll To Top