Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/5825#discussion_r29489916
--- Diff: python/pyspark/sql/dataframe.py ---
@@ -868,6 +875,17 @@ def fillna(self, value, subset=None):
return DataFrame(self._jdf.na().fill(value,
self._jseq(subset)), self.sql_ctx)
+ def cov(self, col1, col2):
+ """
+ Calculate the covariance for the given columns, specified by their
names.
+ alias for ``stat.cov()``.
+
+ :param col1: The name of the first column
+ :param col2: The name of the second column
+ :return: the covariance of the columns
--- End diff --
does ```:return:``` work in python doc? Can you try compiling it?
Also say something about the return type, maybe "covariance of the two
columns as a double value"
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]