-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Update frame.py #42667
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
Update frame.py #42667
Conversation
Added an example to the reorder_levels function
Hello @trevorkask! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
the linter has a few complaints |
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.
ping when green
'species':['Humans','Dogs','Snakes','Iguanas','Frogs','Aquatic Salamanders'] | ||
} | ||
|
||
>>> df=pd.DataFrame(data,columns=['class','diet','species']) |
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.
space around the equals
|
||
Examples | ||
-------- | ||
>>> data={'class':['Mammals','Mammals','Reptiles','Reptiles','Amphibians','Amphibians'], |
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 don't think this is pep8 formatted, can you add spaces where needed
|
||
>>> df.set_index(['class','diet'],drop=True,inplace=True) | ||
|
||
>>> df.reorder_levels(["diet", "class"]) |
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.
is this how it actually renders?
closing in favor of #42935 |
Added an example to the reorder_levels function