pyspark.sql.functions.kurtosisΒΆ

pyspark.sql.functions.kurtosis(col: ColumnOrName) → pyspark.sql.column.Column[source]ΒΆ

Aggregate function: returns the kurtosis 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

kurtosis of given column.

Examples

>>> df = spark.createDataFrame([[1],[1],[2]], ["c"])
>>> df.select(kurtosis(df.c)).show()
+-----------+
|kurtosis(c)|
+-----------+
|       -1.5|
+-----------+