-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Update documentation for rename #13533
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
needs an update to the doc string as well |
Updated docstring |
Current coverage is 84.33%@@ master #13533 diff @@
==========================================
Files 138 138
Lines 51111 51111
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 43107 43107
Misses 8004 8004
Partials 0 0
|
@@ -555,8 +555,8 @@ def swaplevel(self, i=-2, j=-1, axis=0): | |||
_shared_docs['rename'] = """ | |||
Alter axes input function or functions. Function / dict values must be | |||
unique (1-to-1). Labels not contained in a dict / Series will be left | |||
as-is. Alternatively, change ``Series.name`` with a scalar | |||
value (Series only). | |||
as-is. Extra labels listed don't throw an error. Alternatively, change |
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.
can you add 1 or more examples in Examples
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.
added
|
||
.. ipython:: python | ||
|
||
df.rename(columns={'one' : 'foo', 'two' : 'bar'}, | ||
index={'a' : 'apple', 'b' : 'banana', 'd' : 'durian'}) | ||
|
||
If mapping doesn't name a column/index, it isn't renamed. Also extra names |
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.
"If mapping doesn't name a column/index," -> "If the mapping doesn't include a column/index label"
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.
thank you. corrected
@gliptak A small grammatical comment, otherwise looks good! |
Thanks! |
git diff upstream/master | flake8 --diff