-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
KeyError when indexing the MultiIndex of a DataFrame with ":" as first field #13597
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
(reminds #12827, not sure it's really related though) |
This is ambiguous indexing from a slicer and is not possible to detect. See the warning: http://pandas.pydata.org/pandas-docs/stable/advanced.html#using-slicers You can do this:
|
@toobaz Additional reason that this is confusing is that |
@jorisvandenbossche @jreback Yes, I see. I reported the issue because it seemed to me incoherent with the use of (for instance) lists... But then, I just noticed that Maybe the coherent behaviour I have in mind implies unwanted side-effects which I am missing... still the current behaviour is quite unexpected in several cases. But true, the documentation suggests one should not even try. |
Code Sample, a copy-pastable example if possible
Expected Output
Either something analogous to the previous command, or all 3 should raise an error I guess.
output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: