-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Documentation/behaviour error for selecting by label #7999
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
Comments
yeh, let me see if I can fix this inconsistency. indexing code has so many paths. |
@ruidc ok, this cleaned up the indexing a bit (well a little). pls have a look over the PR, the release notes should explain. |
if i understand correctly,
From: jreback [email protected] @ruidc ok, this cleaned up the indexing a bit (well a little). |
@ruidc right, you would get a reindex (with the missing) set to This is unchanged from 0.14.1 (and from the
you can of course
|
Sure it's primarily that it is not as presently documented . |
@ruidc ahh, can you post what you think should be then? |
"at least one of the labels for which you ask must be in the index..." "ALL of the labels for which you ask, must be in the index..." if that is the correct behavior. From: jreback [email protected] @ruidc ahh, can you post what you think should be then? |
we just had a conv about that, see #8003 |
"ALL of the labels for which you ask, must be in the index or a KeyError will be raised!"
http://pandas.pydata.org/pandas-docs/stable/indexing.html#selection-by-label
and
".loc is strictly label based, will raise KeyError when the items are not found":
http://pandas.pydata.org/pandas-docs/stable/indexing.html#different-choices-for-indexing-loc-iloc-and-ix
also, possibly separate bug:
DOES fail, so we have an inconsistency between .loc[values,:] and .loc[values]
The text was updated successfully, but these errors were encountered: