尖度
グループ内の値の尖度を返します。
構文
Python
from pyspark.sql import functions as sf
sf.kurtosis(col)
パラメーター
パラメーター | Type | 説明 |
|---|---|---|
|
| ターゲットカラムをコンピュートに。 |
戻り値
pyspark.sql.Column: 指定された列の尖度。
例
Python
from pyspark.sql import functions as sf
df = spark.createDataFrame([[1],[1],[2]], ["c"])
result = df.select(sf.kurtosis(df.c)).collect()[0][0]
spark.createDataFrame([(result < -1.49 and result > -1.51,)], ["within_expected_range"]).show()
Output
+---------------------+
|within_expected_range|
+---------------------+
| true|
+---------------------+