pyspark.sql.functions.var_pop¶
-
pyspark.sql.functions.
var_pop
(col: ColumnOrName) → pyspark.sql.column.Column[source]¶ Aggregate function: returns the population variance of the values in a group.
New in version 1.6.0.
Changed in version 3.4.0: Supports Spark Connect.
Examples
>>> df = spark.range(6) >>> df.select(var_pop(df.id)).first() Row(var_pop(id)=2.91666...)