-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Series.loc/iloc[x, y] does not raise exception #13831
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
this is a bug for a non-MultiIndex. (for BUT this IS valid for a MI. In [10]: s = Series([1,2,3], index=pd.MultiIndex.from_tuples([(0,'a'),(0,'b'),(1,'a')]))
|
pull requests are welcome, keep in mind that there are hundreds of existing test cases that still must pass, so careful changing things. Further note that you ARE chained indexing, and SETTING, which in this particular case is ok (as its a single dtype), but in general is NOT recommended, nor can you always detect it. |
This does raise for a non-integer index already (for
so this could use some more comprehensive testing. |
the iloc setitem case now raises as expected. on 0.25.3 gave the loc setitem still does not raise. |
take |
Code Sample, a copy-pastable example if possible
See this SO post
Expected Output
Expected an IndexingError exception in every case where two values are used to index a Series.
output of
pd.show_versions()
pandas version 0.18.1, python 3.5
The text was updated successfully, but these errors were encountered: