-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC add example to reorder levels #42935
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
Response to changes suggested on my previous pull request
Hello @trevorkask! 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-08-23 15:16:42 UTC |
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.
Have you tried building the docs to check this looks right?
https://pandas.pydata.org/pandas-docs/stable/development/contributing_documentation.html
Are you going to close #42667 or this? You should really continue that PR and close this one. |
Fixed the indentation issue
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 try building the docs for this function locally to check it renders fine? (hint: at the moment it won't, this'll help you tell whether the PR is ready)
pandas/core/frame.py
Outdated
""" | ||
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.
This won't render, it needs to be inside the docstring
pandas/core/frame.py
Outdated
'species':['Humans','Dogs','Snakes','Iguanas','Frogs','Aquatic Salamanders'] | ||
} | ||
>>> df=pd.DataFrame(data,columns=['class','diet','species']) | ||
>>> df.set_index(['class','diet'],drop=True,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.
can you write this without using inplace=True
please?
use this one |
Built the example inside the docstring and removed the unnecessary 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.
Hi @trevorkask - the example looks good, there's just some stylistic errors
Can you fix them up? See https://pandas.pydata.org/pandas-docs/stable/development/contributing_codebase.html?highlight=pre%20commit#pre-commit
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.
Thanks @trevorkask |
* Update frame.py Response to changes suggested on my previous pull request * Update frame.py Fixed the indentation issue * Update frame.py Built the example inside the docstring and removed the unnecessary inplace=true * fixup Co-authored-by: Marco Gorelli <[email protected]>
Response to changes suggested on my previous pull request