-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
API: allow list-like to DataFrame rename #15029
Conversation
assert_frame_equal(result, expected) | ||
|
||
result = df.copy() | ||
result.rename(columns=['J', 'K'], index=['a', 'b'], 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.
test with ndarray and with an Index
a scalar should error yes?
Current coverage is 84.77% (diff: 100%)@@ master #15029 diff @@
==========================================
Files 145 145
Lines 51131 51133 +2
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 43345 43348 +3
+ Misses 7786 7785 -1
Partials 0 0
|
this is also now an alternative to the |
I added a couple doc references, but I might be missing something - wasn't sure if there is a canonical spot for the |
http://pandas.pydata.org/pandas-docs/stable/indexing.html#set-reset-index ad-hoc indexing. This would be expanded in any event (and maybe moved to http://pandas.pydata.org/pandas-docs/stable/basics.html#renaming-mapping-labels) as these are the same idea. |
Closing in favor of #15104 |
git diff upstream/master | flake8 --diff