Skip to main content
`Ctrl`+`K`

# pandas.api.typing.SeriesGroupBy.skew

SeriesGroupBy.skew(skipna=True, numeric_only=False, **kwargs)

  Return unbiased skew within groups.

  Normalized by N-1.

  Parameters:
    skipna bool, default True

      Exclude NA/null values when computing the result.

    numeric_only bool, default False

      Include only float, int, boolean columns. Not implemented for Series.

    **kwargs

      Additional keyword arguments to be passed to the function.

      Deprecated since version 3.1.0: Passing `**kwargs` to SeriesGroupBy.skew is deprecated and will be removed in a future version of pandas.

  Returns:
    Series

      Unbiased skew within groups.

  See also

  `Series.skew`

    Return unbiased skew over requested axis.

  Examples

      >>> ser = pd.Series(
      ...     [390.0, 350.0, 357.0, np.nan, 22.0, 20.0, 30.0],
      ...     index=[
      ...         "Falcon",
      ...         "Falcon",
      ...         "Falcon",
      ...         "Falcon",
      ...         "Parrot",
      ...         "Parrot",
      ...         "Parrot",
      ...     ],
      ...     name="Max Speed",
      ... )
      >>> ser
      Falcon    390.0
      Falcon    350.0
      Falcon    357.0
      Falcon      NaN
      Parrot     22.0
      Parrot     20.0
      Parrot     30.0
      Name: Max Speed, dtype: float64
      >>> ser.groupby(level=0).skew()
      Falcon    1.525174
      Parrot    1.457863
      Name: Max Speed, dtype: float64
      >>> ser.groupby(level=0).skew(skipna=False)
      Falcon         NaN
      Parrot    1.457863
      Name: Max Speed, dtype: float64