Skip to content

DOC: expand the documentation on the xs method #4921

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 22, 2013
Merged

DOC: expand the documentation on the xs method #4921

merged 1 commit into from
Sep 22, 2013

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Sep 21, 2013

closes #4900

@ghost ghost assigned cpcloud Sep 21, 2013
@cpcloud
Copy link
Member Author

cpcloud commented Sep 21, 2013

@jreback @jtratner any last words?


df.xs('one', level='second', axis=1, drop_level=False)

Here's the result with ``drop_level=False``
Copy link
Contributor

Choose a reason for hiding this comment

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

You should swap these two and then with drop_level=True, you can just say something like `whereas, with ''drop_level=True'', the level is dropped'

@jreback
Copy link
Contributor

jreback commented Sep 21, 2013

nice

df = df.T
df.xs('one', level='second', axis=1)

:meth:`~pandas.MultiIndex.xs` also allow selection with multiple keys
Copy link
Member

Choose a reason for hiding this comment

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

allow -> allows

Copy link
Member Author

Choose a reason for hiding this comment

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

@jreback
Copy link
Contributor

jreback commented Sep 22, 2013

cool

cpcloud added a commit that referenced this pull request Sep 22, 2013
DOC: expand the documentation on the xs method
@cpcloud cpcloud merged commit 5b0db94 into pandas-dev:master Sep 22, 2013
@cpcloud cpcloud deleted the mi-doc-blurb branch September 22, 2013 02:52
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.

Add doc blurb for slicing MultiIndex columns
4 participants