-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: update pandas.Series.rename_axis #20137
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
Conversation
pandas/core/generic.py
Outdated
""" | ||
Alter the name of the index or columns. | ||
|
||
This function alters the name of the index or columns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is just restating the short summary I think it can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
pandas/core/generic.py
Outdated
|
||
Parameters | ||
---------- | ||
mapper : scalar, list-like, optional | ||
Value to set the axis name attribute. | ||
axis : int or string, default 0 | ||
axis : int, str, default 0 | ||
The index or the name of the axis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where inconsistent with axis. But
axis : {0 or 'index', 1 or 'columns'}, default 0
seems to be the most common.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
pandas/core/generic.py
Outdated
|
||
Returns | ||
------- | ||
renamed : type of caller or None if inplace=True | ||
type of caller or None if inplace=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be
renamed : Series, DataFrame, or None
The same type as the caller or None if `inplace` is True.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
d34d2b6
to
c1e91f9
Compare
Updated PR after review, thanks! |
[ci skip]
Codecov Report
@@ Coverage Diff @@
## master #20137 +/- ##
==========================================
- Coverage 91.72% 91.72% -0.01%
==========================================
Files 150 150
Lines 49156 49152 -4
==========================================
- Hits 45090 45086 -4
Misses 4066 4066
Continue to review full report at Codecov.
|
Added a series example. Thanks @xrmx! |
Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):
scripts/validate_docstrings.py <your-function-or-method>
git diff upstream/master -u -- "*.py" | flake8 --diff
python doc/make.py --single <your-function-or-method>
Please include the output of the validation script below between the "```" ticks: