pyspark.pandas.Series.kurtosis¶
-
Series.
kurtosis
(axis: Union[int, str, None] = None, skipna: bool = True, numeric_only: bool = None) → Union[int, float, bool, str, bytes, decimal.Decimal, datetime.date, datetime.datetime, None, Series]¶ Return unbiased kurtosis using Fisher’s definition of kurtosis (kurtosis of normal == 0.0). Normalized by N-1.
- Parameters
- axis: {index (0), columns (1)}
Axis for the function to be applied on.
- skipna: bool, default True
Exclude NA/null values when computing the result.
Changed in version 3.4.0: Supported including NA/null values.
- numeric_only: bool, default None
Include only float, int, boolean columns. False is not supported. This parameter is mainly for pandas compatibility.
- Returns
- kurt: scalar for a Series, and a Series for a DataFrame.
Examples
>>> df = ps.DataFrame({'a': [1, 2, 3, np.nan, 6], 'b': [0.1, 0.2, 0.3, np.nan, 0.8]}, ... columns=['a', 'b'])
On a DataFrame:
>>> df.kurtosis() a 1.500000 b 2.703924 dtype: float64
On a Series:
>>> df['a'].kurtosis() 1.5