From 23e6d6d96e665bcb8a67e9c0ae0b4bfec52bb90c Mon Sep 17 00:00:00 2001 From: LiXuanqi Date: Sat, 22 Jun 2019 02:12:14 -0700 Subject: [PATCH 1/3] DOC: Do not mention private classes in the documentation (#26981) --- pandas/core/generic.py | 10 +++++----- pandas/core/groupby/groupby.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 360576ffdb00a..a5944754eac47 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -56,7 +56,7 @@ # able to share _shared_docs = dict() _shared_doc_kwargs = dict( - axes='keywords for axes', klass='NDFrame', + axes='keywords for axes', klass='DataFrame', axes_single_arg='int or labels for object', args_transpose='axes to permute (int or label for object)', optional_by=""" @@ -1940,7 +1940,7 @@ def __array_wrap__(self, result, context=None): def to_dense(self): """ - Return dense representation of NDFrame (as opposed to sparse). + Return dense representation of DataFrame (as opposed to sparse). .. deprecated:: 0.25.0 @@ -9011,7 +9011,7 @@ def tshift(self, periods=1, freq=None, axis=0): Returns ------- - shifted : NDFrame + shifted : DataFrame Notes ----- @@ -10247,12 +10247,12 @@ def _find_valid_index(self, how): return idx @Appender(_shared_docs['valid_index'] % {'position': 'first', - 'klass': 'NDFrame'}) + 'klass': 'DataFrame'}) def first_valid_index(self): return self._find_valid_index('first') @Appender(_shared_docs['valid_index'] % {'position': 'last', - 'klass': 'NDFrame'}) + 'klass': 'DataFrame'}) def last_valid_index(self): return self._find_valid_index('last') diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 43950f2f503c8..64cacd60da30f 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -630,14 +630,14 @@ def curried(x): def get_group(self, name, obj=None): """ - Construct NDFrame from group with provided name. + Construct DataFrame from group with provided name. Parameters ---------- name : object the name of the group to get as a DataFrame - obj : NDFrame, default None - the NDFrame to take the DataFrame out of. If + obj : DataFrame, default None + the DataFrame to take the DataFrame out of. If it is None, the object groupby was called on will be used From 09de96dd0b1175d9dea5a3624633a767d35a37cf Mon Sep 17 00:00:00 2001 From: LiXuanqi Date: Sat, 22 Jun 2019 02:19:25 -0700 Subject: [PATCH 2/3] DOC: Add 'GL04', 'GL05' to 'ci/code_checks' (#26981) --- ci/code_checks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index a16580679ff54..ac86815569a0c 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -256,8 +256,8 @@ fi ### DOCSTRINGS ### if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then - MSG='Validate docstrings (GL03, GL06, GL07, GL09, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA05)' ; echo $MSG - $BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL06,GL07,GL09,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA05 + MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA05)' ; echo $MSG + $BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL04,GL05,GL06,GL07,GL09,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA05 RET=$(($RET + $?)) ; echo $MSG "DONE" fi From de96c3869876d17868818967b288f6f259f66a59 Mon Sep 17 00:00:00 2001 From: LiXuanqi Date: Sat, 22 Jun 2019 21:04:25 -0700 Subject: [PATCH 3/3] DOC: Use 'Series/DataFrame' to replace 'NDFrame' in core/generic.py --- pandas/core/generic.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 4760865c507bc..0e2a6a0cac414 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -56,7 +56,7 @@ # able to share _shared_docs = dict() _shared_doc_kwargs = dict( - axes='keywords for axes', klass='DataFrame', + axes='keywords for axes', klass='Series/DataFrame', axes_single_arg='int or labels for object', args_transpose='axes to permute (int or label for object)', optional_by=""" @@ -1940,7 +1940,7 @@ def __array_wrap__(self, result, context=None): def to_dense(self): """ - Return dense representation of DataFrame (as opposed to sparse). + Return dense representation of Series/DataFrame (as opposed to sparse). .. deprecated:: 0.25.0 @@ -9036,7 +9036,7 @@ def tshift(self, periods=1, freq=None, axis=0): Returns ------- - shifted : DataFrame + shifted : Series/DataFrame Notes ----- @@ -10272,12 +10272,12 @@ def _find_valid_index(self, how): return idx @Appender(_shared_docs['valid_index'] % {'position': 'first', - 'klass': 'DataFrame'}) + 'klass': 'Series/DataFrame'}) def first_valid_index(self): return self._find_valid_index('first') @Appender(_shared_docs['valid_index'] % {'position': 'last', - 'klass': 'DataFrame'}) + 'klass': 'Series/DataFrame'}) def last_valid_index(self): return self._find_valid_index('last')