pyspark.pandas.DataFrame.skew

DataFrame.skew(axis: Union[int, str, None] = None, numeric_only: bool = None) → Union[int, float, bool, str, bytes, decimal.Decimal, datetime.date, datetime.datetime, None, Series]

Return unbiased skew normalized by N-1.

Parameters
axis{index (0), columns (1)}

Axis for the function to be applied on.

numeric_onlybool, default None

Include only float, int, boolean columns. False is not supported. This parameter is mainly for pandas compatibility.

Returns
skewscalar for a Series, and a Series for a DataFrame.

Examples

>>> df = ps.DataFrame({'a': [1, 2, 3, np.nan], 'b': [0.1, 0.2, 0.3, np.nan]},
...                   columns=['a', 'b'])

On a DataFrame:

>>> df.skew()  
a    0.000000e+00
b   -3.319678e-16
dtype: float64

On a Series:

>>> df['a'].skew()
0.0