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 False and the array contains NA values, a ValueError is raised.

Returns:
int

Position of the first occurrence of the maximum value.

See also

ExtensionArray.argmin

Return the index of the minimum value.

Examples

>>> arr = pd.array([3, 1, 2, 5, 4])
>>> arr.argmax()
np.int64(3)