xorbits.pandas.Index.argmax#
- Index.argmax(axis=None, skipna: bool = True, *args, **kwargs) int [source]#
Return int position of the largest value in the Series.
If the maximum is achieved in multiple locations, the first row position is returned.
- Parameters
axis ({None}) – Unused. Parameter needed for compatibility with DataFrame.
skipna (bool, default True) – Exclude NA/null values when showing the result.
*args – Additional arguments and keywords for compatibility with NumPy.
**kwargs – Additional arguments and keywords for compatibility with NumPy.
- Returns
Row position of the maximum value.
- Return type
int
See also
Series.argmax
Return position of the maximum value.
Series.argmin
Return position of the minimum value.
numpy.ndarray.argmax
Equivalent method for numpy arrays.
Series.idxmax
Return index label of the maximum values.
Series.idxmin
Return index label of the minimum values.
Examples
Consider dataset containing cereal calories
>>> s = pd.Series({'Corn Flakes': 100.0, 'Almond Delight': 110.0, ... 'Cinnamon Toast Crunch': 120.0, 'Cocoa Puff': 110.0}) >>> s Corn Flakes 100.0 Almond Delight 110.0 Cinnamon Toast Crunch 120.0 Cocoa Puff 110.0 dtype: float64
>>> s.argmax() 2 >>> s.argmin() 0
The maximum cereal calories is the third element and the minimum cereal calories is the first element, since series is zero-indexed.
Warning
This method has not been implemented yet. Xorbits will try to execute it with pandas.
This docstring was copied from pandas.core.indexes.base.Index.