หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Returns the unbiased sample variance of the values in a group.
Syntax
from pyspark.sql import functions as sf
sf.var_samp(col)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or column name |
Target column to compute on. |
Returns
pyspark.sql.Column: variance of given column.
Examples
from pyspark.sql import functions as sf
df = spark.range(6)
df.select(sf.var_samp(df.id)).show()
+------------+
|var_samp(id)|
+------------+
| 3.5|
+------------+