Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5825#discussion_r29492442
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -1311,6 +1328,23 @@ def fill(self, value, subset=None):
         fill.__doc__ = DataFrame.fillna.__doc__
     
     
    +class DataFrameStatFunctions(object):
    +    """Functionality for statistic functions with :class:`DataFrame`.
    +    """
    +
    +    def __init__(self, df):
    +        self.df = df
    +
    +    def cov(self, col1, col2):
    +        if not isinstance(col1, str):
    +            raise ValueError("col1 should be a string.")
    +        if not isinstance(col2, str):
    +            raise ValueError("col2 should be a string.")
    +        return self.df._jdf.stat().cov(col1, col2)
    +
    +    cov.__doc__ = DataFrame.cov.__doc__
    --- End diff --
    
    if you do the doc assignment here, then you should move the implementation 
to dataframe also ... or just put the doc assignment there. don't put the doc 
in one place and implementation in another


---
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]

Reply via email to