Skip to content

DOC: mention that stack/unstack implicicly sort #7937

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 2 commits into from
Aug 5, 2014

Conversation

toobaz
Copy link
Member

@toobaz toobaz commented Aug 5, 2014

It took me a while to discover what was causing this TypeError... I guess this can be useful to other people.

(Yes, I know there is a note somewhere warning users that some operations depend on the index being sorted, but maybe this is a sligthly different case, since the operations do work after all, the problem is they do something more than what is documented)

all(df.unstack().stack() == df.sort())

while the above code will raise a ``TypeError`` if the call to ``sort`` is
removed.
Copy link
Member

Choose a reason for hiding this comment

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

the spaces before removed should be removed

@toobaz
Copy link
Member Author

toobaz commented Aug 5, 2014

Oops, done... by the way: maybe this info could go also/instead in the docs for the two methods, I'm not sure.

@jorisvandenbossche
Copy link
Member

Yes, I think you can add a note in the docstring.

jreback added a commit that referenced this pull request Aug 5, 2014
DOC: mention that stack/unstack implicicly sort
@jreback jreback merged commit 472de31 into pandas-dev:master Aug 5, 2014
@jreback
Copy link
Contributor

jreback commented Aug 5, 2014

thanks!

@toobaz toobaz deleted the stack_unstack_doc branch August 5, 2014 22:05
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