Skip to content

DOC: Do not mention private classes in the documentation #26997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside this file (generic.py), I would replace all occurences of 'NDFrame' with "Series/DataFrame", since those docstrings might be shared by both Series and DataFrame

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorisvandenbossche I have fixed the issue. How do you think?

axes_single_arg='int or labels for object',
args_transpose='axes to permute (int or label for object)',
optional_by="""
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -9011,7 +9011,7 @@ def tshift(self, periods=1, freq=None, axis=0):

Returns
-------
shifted : NDFrame
shifted : DataFrame

Notes
-----
Expand Down Expand Up @@ -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')

Expand Down
6 changes: 3 additions & 3 deletions pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down