nxcals.api.extraction.data.builders.DataFrame.stat

property DataFrame.stat: DataFrameStatFunctions

Returns a DataFrameStatFunctions for statistic functions.

New in version 1.4.0.

Changed in version 3.4.0: Supports Spark Connect.

Return type:

DataFrameStatFunctions

Examples

>>> import pyspark.sql.functions as f
>>> df = spark.range(3).withColumn("c", f.expr("id + 1"))
>>> type(df.stat)
<class '...dataframe.DataFrameStatFunctions'>
>>> df.stat.corr("id", "c")
1.0