pyspark.sql.DataFrameStatFunctions.cov¶
-
DataFrameStatFunctions.
cov
(col1, col2)[source]¶ Calculate the sample covariance for the given columns, specified by their names, as a double value.
DataFrame.cov()
andDataFrameStatFunctions.cov()
are aliases.New in version 1.4.0.
- Parameters
- col1str
The name of the first column
- col2str
The name of the second column