pyspark.sql.DataFrame.cov¶
-
DataFrame.
cov
(col1: str, col2: str) → float¶ Calculate the sample covariance for the given columns, specified by their names, as a double value.
DataFrame.cov()
andDataFrameStatFunctions.cov()
are aliases.- Parameters
- col1str
The name of the first column
- col2str
The name of the second column