Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upKeep index dimension when selecting only a single coord #3458
Labels
Comments
|
I think |
|
We should add this as an example in the documentation since it comes up often enough. |
|
Great, thanks so much!
…On Tue, Oct 29, 2019 at 11:20 AM Deepak Cherian ***@***.***> wrote:
We should add this to the documentation since it comes up often enough.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3458?email_source=notifications&email_token=ADJB47PJGAKVFXIPKCOVBTDQRB5HJA5CNFSM4JGMJOP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECRSJQQ#issuecomment-547562690>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADJB47NCROANMZGIJCOCTFLQRB5HJANCNFSM4JGMJOPQ>
.
|
|
Also |
|
Note that this doesn't work on MultiIndex levels, since vectorized operations on them are not currently supported. Meanwhile, using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


MCVE Code Sample
Expected Output
I'd like to be able to use named .loc indexing to select only a single named coord from one dimension, but not have that dimension collapse when subsetting.
Problem Description
I looked, but wasn't able to find anything in the documentation about how to perform this same action using named coords. It works with integer-based slicing.
Output of
xr.show_versions()