Skip to main content
`Ctrl`+`K`

# pandas.api.typing.SeriesGroupBy.kurt

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

  Return unbiased kurtosis within groups.

  Kurtosis measures the tailedness of a distribution. This method computes Fisher’s definition of kurtosis (normal distribution has a kurtosis of zero) for each group, using the unbiased estimator.

  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.

  Returns:
    Series

      Unbiased kurtosis within groups.

  See also

  `Series.kurt`

    Return unbiased kurtosis over requested axis.

  Examples

      >>> ser = pd.Series(
      ...     [390.0, 350.0, 357.0, 333.0, np.nan, 22.0, 20.0, 30.0, 40.0, 41.0],
      ...     index=[
      ...         "Falcon",
      ...         "Falcon",
      ...         "Falcon",
      ...         "Falcon",
      ...         "Falcon",
      ...         "Parrot",
      ...         "Parrot",
      ...         "Parrot",
      ...         "Parrot",
      ...         "Parrot",
      ...     ],
      ...     name="Max Speed",
      ... )
      >>> ser
      Falcon    390.0
      Falcon    350.0
      Falcon    357.0
      Falcon    333.0
      Falcon      NaN
      Parrot     22.0
      Parrot     20.0
      Parrot     30.0
      Parrot     40.0
      Parrot     41.0
      Name: Max Speed, dtype: float64
      >>> ser.groupby(level=0).kurt()
      Falcon    1.622109
      Parrot   -2.878714
      Name: Max Speed, dtype: float64
      >>> ser.groupby(level=0).kurt(skipna=False)
      Falcon         NaN
      Parrot   -2.878714
      Name: Max Speed, dtype: float64