Skip to content

Commit f2e862b

Browse files
committed
fixed failed test
1 parent 51e39b8 commit f2e862b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/pyspark/sql/dataframe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ def cov(self, col1, col2):
887887
raise ValueError("col1 should be a string.")
888888
if not isinstance(col2, str):
889889
raise ValueError("col2 should be a string.")
890-
return self.df._jdf.stat().cov(col1, col2)
890+
return self._jdf.stat().cov(col1, col2)
891891

892892
@ignore_unicode_prefix
893893
def withColumn(self, colName, col):
@@ -1340,7 +1340,7 @@ def __init__(self, df):
13401340
self.df = df
13411341

13421342
def cov(self, col1, col2):
1343-
return self.stat.cov(col1, col2)
1343+
return self.df.cov(col1, col2)
13441344

13451345
cov.__doc__ = DataFrame.cov.__doc__
13461346

0 commit comments

Comments
 (0)