pandas.api.extensions.ExtensionArray.argmax#
- ExtensionArray.argmax(skipna=True)[source]#
Return the index of maximum value.
In case of multiple occurrences of the maximum value, the index corresponding to the first occurrence is returned.
- Parameters:
- skipnabool, default True
Exclude NA values when locating the maximum. If
Falseand the array contains NA values, aValueErroris raised.
- Returns:
- int
Position of the first occurrence of the maximum value.
See also
ExtensionArray.argminReturn the index of the minimum value.
Examples
>>> arr = pd.array([3, 1, 2, 5, 4]) >>> arr.argmax() np.int64(3)