-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Edit MultiIndex.set_levels() docstring to clarify that set_levels() interprets passed values as new components of the .levels attribute (#28294) #29143
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
…-set_levels update branch with new changes in project
can you rebase |
Hello @jbrockmendel, do you mean 'git rebase upstream/master' or 'git fetch upstream && git merge upstream/master' to resolve conflicts? Just wanted to confirm in order to avoid the git diff issues I encountered earlier in #28797 |
I usually do |
Not sure what happened, but I did a Edit: Did a |
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.
Some minor edits; this is a rather tough concept to express so I think if we can make succinct will help explain better
lgtm @gfyoung care to take a look? |
pandas/core/indexes/multi.py
Outdated
|
||
If any of the levels passed to ``set_levels()`` exceeds the | ||
existing length, all of the values from that argument will | ||
be stored though truncated in the MultiIndex output. |
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.
This wording ("stored though truncated") is a little awkward - not sure I 100% understand what this means
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.
Would the following wording be clearer in expressing the concept?
"stored in the MultiIndex levels, though the values will be truncated in the MultiIndex output."
Feel free to let me know what you think.
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 that’s a great edit - care to make that change?
can you merge master |
@jbrockmendel I've done a "git fetch upstream" and "git merge upstream/master" - let's hope tests pass this time. |
Okay, I have no idea what happened to my branch when I'm merging master, and tests are failing - suspect that it's caused by my previous commits made by merging master. Anyone has any idea what to do with this? |
Did you merge You can maybe reset hard back to before the merge and try again with |
9e205b6
to
a482b78
Compare
a482b78
to
2a97c43
Compare
Just checked - tests finally passed after the reset hard and merge with |
Thanks for the work on this @hweecat |
Added documentation on MultiIndex.set_levels to clarify that MultiIndex.set_levels() interprets passed values as new components of the .levels attribute. Continuation of #28797 due to issues with Travis CI for Python 3.8 and subsequent git diff issues resulting from resolution of Travis CI issues.
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff