From 190faac7f1fa1accf4ec0ffa566ae1fd88b9692c Mon Sep 17 00:00:00 2001 From: Rakshit Naidu Date: Tue, 4 Feb 2020 08:12:21 +0530 Subject: [PATCH 1/3] Update generic.py --- pandas/core/generic.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 3bb584d4d34e8..e4c2d7c1c0895 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -10315,10 +10315,6 @@ def _doc_parms(cls): level : int or level name, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a %(name1)s. -numeric_only : bool, default None - Include only float, int, boolean columns. If None, will attempt to use - everything, then use only numeric data. Not implemented for Series. -%(min_count)s\ **kwargs Additional keyword arguments to be passed to the function. From 8b53292196438a0902c2c89f3744a1cbc68a69f5 Mon Sep 17 00:00:00 2001 From: Rakshit Naidu Date: Tue, 4 Feb 2020 16:02:33 +0530 Subject: [PATCH 2/3] Updated generic.py --- pandas/core/generic.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index e4c2d7c1c0895..8f0ce355f0c70 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -9960,7 +9960,7 @@ def _add_numeric_operations(cls): see_also="", examples="", ) - @Appender(_num_doc) + @Appender(_num_doc_mad) def mad(self, axis=None, skipna=None, level=None): if skipna is None: skipna = True @@ -10306,6 +10306,32 @@ def _doc_parms(cls): _num_doc = """ %(desc)s +Parameters +---------- +axis : %(axis_descr)s + Axis for the function to be applied on. +skipna : bool, default True + Exclude NA/null values when computing the result. +level : int or level name, default None + If the axis is a MultiIndex (hierarchical), count along a + particular level, collapsing into a %(name1)s. +numeric_only : bool, default None + Include only float, int, boolean columns. If None, will attempt to use + everything, then use only numeric data. Not implemented for Series. +%(min_count)s\ +**kwargs + Additional keyword arguments to be passed to the function. + +Returns +------- +%(name1)s or %(name2)s (if level specified)\ +%(see_also)s\ +%(examples)s +""" + +_num_doc_mad = """ +%(desc)s + Parameters ---------- axis : %(axis_descr)s From 4227ba45bbd71f92c3913466572a8ee9bc8f3781 Mon Sep 17 00:00:00 2001 From: Rakshit Naidu Date: Tue, 4 Feb 2020 16:21:04 +0530 Subject: [PATCH 3/3] Updated generic.py --- pandas/core/generic.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 8f0ce355f0c70..b809bc1a1c496 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -10336,13 +10336,11 @@ def _doc_parms(cls): ---------- axis : %(axis_descr)s Axis for the function to be applied on. -skipna : bool, default True +skipna : bool, default None Exclude NA/null values when computing the result. level : int or level name, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a %(name1)s. -**kwargs - Additional keyword arguments to be passed to the function. Returns -------