pyspark.sql.functions.
stddev_samp
Aggregate function: returns the unbiased sample standard deviation of the expression in a group.
New in version 1.6.0.
Changed in version 3.4.0: Supports Spark Connect.
Column
target column to compute on.
standard deviation of given column.
Examples
>>> df = spark.range(6) >>> df.select(stddev_samp(df.id)).first() Row(stddev_samp(id)=1.87082...)