SeriesGroupBy.resample.html)
    * [ pandas.core.groupby.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.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.sem  #

SeriesGroupBy.  sem  (  _ ddof  =  1  _ , _ numeric_only  =  False  _ )  [
[source]  ](https://github.com/pandas-
dev/pandas/blob/v2.2.2/pandas/core/groupby/groupby.py#L2899-L2983) #

    

Compute standard error of the mean of groups, excluding missing values.

For multiple groupings, the result index will be a MultiIndex.

Parameters  :

    

**ddof** int, default 1

    

Degrees of freedom.

**numeric_only** bool, default False

    

Include only  float  ,  int  or  boolean  data.

New in version 1.5.0.

Changed in version 2.0.0:  numeric_only now defaults to ` False  ` .

Returns  :

    

Series or DataFrame

    

Standard error of the mean of values within each group.

Examples

For SeriesGroupBy:

    
    
    >>> lst = ['a', 'a', 'b', 'b']
    >>> ser = pd.Series([5, 10, 8, 14], index=lst)
    >>> ser
    a     5
    a    10
    b     8
    b    14
    dtype: int64
    >>> ser.groupby(level=0).sem()
    a    2.5
    b    3.0
    dtype: float64
    

For DataFrameGroupBy:

    
    
    >>> data = [[1, 12, 11], [1, 15, 2], [2, 5, 8], [2, 6, 12]]
    >>> df = pd.DataFrame(data, columns=["a", "b", "c"],
    ...                   index=["tuna", "salmon", "catfish", "goldfish"])
    >>> df
               a   b   c
        tuna   1  12  11
      salmon   1  15   2
     catfish   2   5   8
    goldfish   2   6  12
    >>> df.groupby("a").sem()
          b  c
    a
    1    1.5  4.5
    2    0.5  2.0
    

For Resampler:

    
    
    >>> ser = pd.Series([1, 3, 2, 4, 3, 8],
    ...                 index=pd.DatetimeIndex(['2023-01-01',
    ...                                         '2023-01-10',
    ...                                         '2023-01-15',
    ...                                         '2023-02-01',
    ...                                         '2023-02-10',
    ...                                         '2023-02-15']))
    >>> ser.resample('MS').sem()
    2023-01-01    0.577350