pyspark.sql.functions.stddev_pop¶
-
pyspark.sql.functions.
stddev_pop
(col: ColumnOrName) → pyspark.sql.column.Column[source]¶ Aggregate function: returns population standard deviation of the expression in a group.
New in version 1.6.0.
Changed in version 3.4.0: Supports Spark Connect.
- Parameters
- col
Column
or str target column to compute on.
- col
- Returns
Column
standard deviation of given column.
Examples
>>> import pyspark.sql.functions as sf >>> spark.range(6).select(sf.stddev_pop("id")).show() +-----------------+ | stddev_pop(id)| +-----------------+ |1.707825127659...| +-----------------+