Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Aggregate function: alias for stddev_samp.
Syntax
from pyspark.sql import functions as sf
sf.std(col)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
Target column to compute on. |
Returns
pyspark.sql.Column: standard deviation of given column.
Examples
Example 1: Calculate standard deviation
from pyspark.sql import functions as sf
spark.range(6).select(sf.std("id")).show()
+------------------+
| std(id)|
+------------------+
|1.8708286933869...|
+------------------+