roupby.SeriesGroupBy.rolling ](pandas.core.groupby.SeriesGroupBy.rolling.html)
    * [ pandas.core.groupby.SeriesGroupBy.sample ](pandas.core.groupby.SeriesGroupBy.sample.html)
    * [ pandas.core.groupby.SeriesGroupBy.sem ](pandas.core.groupby.SeriesGroupBy.sem.html)
    * [ pandas.core.groupby.SeriesGroupBy.shift ](pandas.core.groupby.SeriesGroupBy.shift.html)
    * [ pandas.core.groupby.SeriesGroupBy.size ](pandas.core.groupby.SeriesGroupBy.size.html)
    * [ pandas.core.groupby.SeriesGroupBy.skew ](pandas.core.groupby.SeriesGroupBy.skew.html)
    * [ pandas.core.groupby.SeriesGroupBy.std ](pandas.core.groupby.SeriesGroupBy.std.html)
    * [ pandas.core.groupby.SeriesGroupBy.sum ](pandas.core.groupby.SeriesGroupBy.sum.html)
    * [ pandas.core.groupby.SeriesGroupBy.var ](pandas.core.groupby.SeriesGroupBy.var.html)
    * [ pandas.core.groupby.SeriesGroupBy.tail ](pandas.core.groupby.SeriesGroupBy.tail.html)
    * [ pandas.core.groupby.SeriesGroupBy.take ](pandas.core.groupby.SeriesGroupBy.take.html)
    * [ pandas.core.groupby.SeriesGroupBy.value_counts ](pandas.core.groupby.SeriesGroupBy.value_counts.html)
    * [ pandas.core.groupby.DataFrameGroupBy.boxplot ](pandas.core.groupby.DataFrameGroupBy.boxplot.html)
    * [ pandas.core.groupby.DataFrameGroupBy.hist ](pandas.core.groupby.DataFrameGroupBy.hist.html)
    * [ pandas.core.groupby.SeriesGroupBy.hist ](pandas.core.groupby.SeriesGroupBy.hist.html)
    * [ pandas.core.groupby.DataFrameGroupBy.plot ](pandas.core.groupby.DataFrameGroupBy.plot.html)
    * [ pandas.core.groupby.SeriesGroupBy.plot ](pandas.core.groupby.SeriesGroupBy.plot.html)
  * [ Resampling ](../resampling.html)
  * [ Style ](../style.html)
  * [ Plotting ](../plotting.html)
  * [ Options and settings ](../options.html)
  * [ Extensions ](../extensions.html)
  * [ Testing ](../testing.html)
  * [ Missing values ](../missing_value.html)

  * [ __ ](../../index.html)
  * [ API reference ](../index.html)
  * [ GroupBy ](../groupby.html)
  * pandas.core.... 

#  pandas.core.groupby.SeriesGroupBy.idxmax  #

SeriesGroupBy.  idxmax  (  _ axis  =  _NoDefault.no_default  _ , _ skipna  =
True  _ )  [ [source]  ](https://github.com/pandas-
dev/pandas/blob/v2.2.2/pandas/core/groupby/generic.py#L1182-L1186) #

    

Return the row label of the maximum value.

If multiple values equal the maximum, the first row label with that value is
returned.

Parameters  :

    

**axis** {0 or âindexâ}

    

Unused. Parameter needed for compatibility with DataFrame.

**skipna** bool, default True

    

Exclude NA/null values. If the entire Series is NA, the result will be NA.

***args, **kwargs**

    

Additional arguments and keywords have no effect but might be accepted for
compatibility with NumPy.

Returns  :

    

Index

    

Label of the maximum value.

Raises  :

    

ValueError

    

If the Series is empty.

See also

[ ` numpy.argmax  `
](https://numpy.org/doc/stable/reference/generated/numpy.argmax.html#numpy.argmax
"\(in NumPy v1.26\)")

    

Return indices of the maximum values along the given axis.

` DataFrame.idxmax  `

    

Return index of first occurrence of maximum over requested axis.

` Series.idxmin  `

    

Return index _label_ of the first occurrence of minimum of values.

Notes

This method is the Series version of ` ndarray.argmax  ` . This method returns
the label of the maximum, while ` ndarray.argmax  ` returns the position. To
get the position, use ` series.values.argmax()  ` .

Examples

    
    
    >>> s = pd.Series(data=[1, None, 4, 3, 4],
    ...               index=['A', 'B', 'C', 'D', 'E'])
    >>> s
    A    1.0
    B    NaN
    C    4.0
    D    3.0
    E    4.0
    dtype: float64
    
    
    
    >>> s.idxmax()
    'C'
    

If  skipna  is False and there is an NA value in the data, the function
returns ` nan  ` .

    
    
    >>> s.idxmax(skipna=False)
    nan
    

[ __ previous  pandas.core.groupby.SeriesGroupBy.last
](pandas.core.groupby.SeriesGroupBy.last.html "previous