pyspark.sql.functions.skewness#

pyspark.sql.functions.skewness(col)[source]#

Aggregate function: returns the skewness of the values in a group.

New in version 1.6.0.

Changed in version 3.4.0: Supports Spark Connect.

Parameters
colColumn or str

target column to compute on.

Returns
Column

skewness of given column.

Examples

>>> df = spark.createDataFrame([[1],[1],[2]], ["c"])
>>> df.select(skewness(df.c)).first()
Row(skewness(c)=0.70710...)