BUG: Cannot select values in series using tuples when indexing with tuples in pandas 1.1.0 #35534
Closed
2 of 3 tasks
Labels
Indexing
Related to indexing on series/frames, not to indexes themselves
Regression
Functionality that used to work in a prior pandas version
Milestone
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
On pandas 1.0.5 selecting values of a series which is indexed by tuples was possible via
__getitem__
using the desired tuple (see above code). In pandas 1.1.0 this suddenly raises a ValueError:As this used to work in 1.0.5 and earlier versions (0.25 as far as I can recall) I expect this to be an unwanted side effect rather than a wanted change in behavior (in which case it would certainly be breaking).
Apart from this, I expected Series objects to behave to some degree like python dictionaries. In particular using tuples of strings as keys and selecting values by such tuples I think should be possible.
Expected Output
1
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: