xarray.CFTimeIndex.argmin#
- CFTimeIndex.argmin(axis=None, skipna=True, *args, **kwargs)[source]#
Return int position of the smallest value in the Index.
If the minimum is achieved in multiple locations, the first row position is returned.
- Parameters:
axis (
None) – Unused. Parameter needed for compatibility with DataFrame.skipna (
bool, defaultTrue) – Exclude NA/null values. If the entire Series is NA, or ifskipna=Falseand there is an NA value, this method will raise aValueError.*args, **kwargs – Additional arguments and keywords for compatibility with NumPy.
- Returns:
int– Row position of the minimum value.
See also
Series.argminReturn position of the minimum value.
Series.argmaxReturn position of the maximum value.
numpy.ndarray.argminEquivalent method for numpy arrays.
Series.idxminReturn index label of the minimum values.
Series.idxmaxReturn index label of the maximum values.
Examples
Consider dataset containing cereal calories
>>> idx = pd.Index([100.0, 110.0, 120.0, 110.0]) >>> idx Index([100.0, 110.0, 120.0, 110.0], dtype='float64')
>>> idx.argmax() np.int64(2) >>> idx.argmin() np.int64(0)
The maximum cereal calories is the third element and the minimum cereal calories is the first element, since index is zero-indexed.