-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: rename fails when using level #43667
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
wojtek2kdev
commented
Sep 20, 2021
•
edited
Loading
edited
- closes BUG: rename fails when using level #43659
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
Hello @wojtek2kdev! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-09-23 15:45:42 UTC |
pandas/tests/generic/test_series.py
Outdated
|
||
# issue #43659 | ||
def test_rename_with_multiindex(self): | ||
arrays = [ |
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.
Please add reference in test not above
The test is to complicated. Please reduce number of rows and don't use something like list(zip(*arrays)). You can use MultiIndex.from_arrays
Also need whatsnew |
@phofl Sorry, it's my first PR to this project. What is "whatsnew entry"? |
Check doc/source/whatsnew. These are our release notes. Yours should go into 1.4 |
@phofl I'm not sure, but all of failed checks are my fault? For example: https://github.com/pandas-dev/pandas/pull/43667/checks?check_run_id=3655863372. I checked this test locally and it passes. |
pandas/tests/generic/test_series.py
Outdated
@@ -151,3 +151,26 @@ def finalize(self, other, method=None, **kwargs): | |||
# reset | |||
Series._metadata = _metadata | |||
Series.__finalize__ = _finalize # FIXME: use monkeypatch | |||
|
|||
def test_rename_with_multiindex(self): |
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.
move here: pandas/tests/series/methods/test_rename.py
thanks @wojtek2kdev very nice! |