Skip to content

DOC: Added docs to clarify that MultiIndex.set_levels() interprets passed values as new components of the .levels attribute (#28294) #28797

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

Closed
wants to merge 122 commits into from

Conversation

hweecat
Copy link
Contributor

@hweecat hweecat commented Oct 5, 2019

Added documentation on MultiIndex.set_levels to clarify that MultiIndex.set_levels() interprets passed values as new components of the .levels attribute

Here's my first PR to pandas - looking forward to feedback on how I can further improve this.

@hweecat hweecat force-pushed the docfix-multiindex-setlevels branch 2 times, most recently from 623cc3a to 6faac69 Compare October 5, 2019 13:52
@hweecat hweecat force-pushed the docfix-multiindex-setlevels branch from 6faac69 to e8256cc Compare October 6, 2019 04:24
@hweecat hweecat changed the title DOC: Added docs to clarify that MultiIndex.set_levels() interprets passed values as new components of the .levels attribute #28294 DOC: Added docs to clarify that MultiIndex.set_levels() interprets passed values as new components of the .levels attribute (#28294) Oct 6, 2019
@@ -177,6 +177,37 @@ completely analogous way to selecting a column in a regular DataFrame:
See :ref:`Cross-section with hierarchical index <advanced.xs>` for how to select
on a deeper level.

.. _advanced.set_levels:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather just edit the actual set_levels doc-string with examples. This is too much for the main docs (and not generally what someone would want).

Copy link
Contributor Author

@hweecat hweecat Oct 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I've edited the docstring for set_levels instead - let me know if you have any ideas on how we could improve the explanation.

edit set_levels docstring with additional examples

edit set_levels docstring with additional examples
@hweecat hweecat force-pushed the docfix-multiindex-setlevels branch from 261264c to d9130f2 Compare October 8, 2019 16:24
jbrockmendel and others added 20 commits October 8, 2019 11:59
@pep8speaks
Copy link

pep8speaks commented Oct 19, 2019

Hello @hweecat! 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 2019-10-20 01:51:11 UTC

@hweecat
Copy link
Contributor Author

hweecat commented Oct 20, 2019

Travis CI is failing at Python 3.8-dev but passes for Python 3.6 and 3.7 - not too sure how to resolve this.

https://travis-ci.org/pandas-dev/pandas/jobs/600207880

Edit: Synced my fork with upstream fork in order to pass Travis CI for Python 3.8.

@WillAyd
Copy link
Member

WillAyd commented Oct 22, 2019

@hweecat I'm not sure what happened but the git diff on this seems to have pulled in close to 200 files

Are you still fixing that up? It might be easier to start fresh with a new branch if unsure what happened

@hweecat
Copy link
Contributor Author

hweecat commented Oct 22, 2019

@WillAyd I think it could be because I tried to sync my fork with the upstream in order to pass Travis CI for Python 3.8 (Travis CI kept failing for Python 3.8 previously: https://travis-ci.org/pandas-dev/pandas/jobs/600207880).

Think I might need to start fresh with a new branch (from the master that is synced with the latest upstream) and add changes to that branch. Does that mean I might have to create a new pull request? If yes, I'll proceed to start fresh with a new pull request.

@WillAyd
Copy link
Member

WillAyd commented Oct 22, 2019

Yea it might be easiest to just do that at this point

@WillAyd
Copy link
Member

WillAyd commented Nov 7, 2019

Superseded by #29143

@WillAyd WillAyd closed this Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify that MultiIndex.set_levels() interprets passed values as new components of the .levels attribute