pandas.Series.idxmax
pandas 3.1.1 · Series and accessors · method
Get the label of the first maximum along the selected axis or within a group.
Call syntax
Series.idxmax(axis=0, skipna=True, *args, **kwargs)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
axis |
Optional Positional or keyword Default 0 |
{0 or 'index'} Choose which axis the operation acts on. The accepted axis labels depend on the receiver. |
skipna |
Optional Positional or keyword Default True |
bool Choose whether to exclude missing values during the calculation. |
*args |
Optional Additional positional arguments |
|
**kwargs |
Optional Additional keyword arguments |
Returns
Index