Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Update frame.py #42667

wants to merge 1 commit into from

Conversation

trevorkask
Copy link
Contributor

Added an example to the reorder_levels function

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

Added an example to the reorder_levels function
@pep8speaks
Copy link

Hello @trevorkask! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 6791:1: W293 blank line contains whitespace
Line 6794:89: E501 line too long (96 > 88 characters)
Line 6821:1: W293 blank line contains whitespace

@jbrockmendel
Copy link
Member

the linter has a few complaints

Copy link
Contributor

@jreback jreback left a 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'])
Copy link
Contributor

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'],
Copy link
Contributor

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"])
Copy link
Contributor

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?

@jreback jreback added the Docs label Jul 28, 2021
@attack68 attack68 mentioned this pull request Aug 8, 2021
4 tasks
@jreback
Copy link
Contributor

jreback commented Aug 13, 2021

closing in favor of #42935

@jreback jreback closed this Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants