Skip to main content

skewness

Returns the skewness of the values in a group.

Syntax​

Python
from pyspark.sql import functions as sf

sf.skewness(col)

Parameters​

Parameter

Type

Description

col

pyspark.sql.Column or column name

Target column to compute on.

Parameter

Type

Description

col

pyspark.sql.Column or column name

Target column to compute on.

Returns​

pyspark.sql.Column: skewness of given column.

Examples​

Python
from pyspark.sql import functions as sf
df = spark.createDataFrame([[1],[1],[2]], ["c"])
df.select(sf.skewness(df.c)).show()
Output
+------------------+
| skewness(c)|
+------------------+
|0.7071067811865...|
+------------------+