Skip to content

DOC: correction of example in unstack docstring #4776

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

Merged
merged 1 commit into from
Sep 20, 2013

Conversation

jorisvandenbossche
Copy link
Member

There is an error in the example of the unstack docstring (http://pandas.pydata.org/pandas-docs/dev/generated/pandas.DataFrame.unstack.html ):

>>> df = s.unstack(level=0)
>>> df
   one  two
a  1.   2.
b  3.   4

should be

   one  two
a  1.   3.
b  2.   4

So this PR fixes that, but in the same time I did some other adjustments. Mainly:

  • added a "see also"
  • added in the example the code to create the series, so one can run the example him/herself

>>> df.unstack()
one a 1.
b 3.
two a 2.
b 4.

Copy link
Member

Choose a reason for hiding this comment

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

less than minor point: can u kill this white space here? thx. then i'll merge it

@jorisvandenbossche
Copy link
Member Author

@cpcloud OK, whitespace removed!

@jtratner
Copy link
Contributor

@cpcloud okay to merge?

@ghost ghost assigned jtratner Sep 20, 2013
@cpcloud
Copy link
Member

cpcloud commented Sep 20, 2013

yep

jtratner added a commit that referenced this pull request Sep 20, 2013
DOC: correction of example in unstack docstring
@jtratner jtratner merged commit 0cb6a0f into pandas-dev:master Sep 20, 2013
@jtratner
Copy link
Contributor

thanks @jorisvandenbossche !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants