You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
dti=pd.date_range('2016-01-01', periods=3)
idx=Index(range(3))
ser=pd.Series(range(3), index=dti)
ser2=pd.Series(range(3), index=idx)
key= (1, 2)
value=9ser[key] =value# <- raises KeyError: 'key of type tuple not found and not a MultiIndex'ser2[key] =value# <- raises pandas.errors.IndexingError: Too many indexers
Issue Description
In this example the user wants to treat (1,2) as a scalar label but doing so fails. I'd be open to "the user shouldn't do this". Otherwise I think something like #42349 to make users be explicit when they want to do something ugly like this is probably simpler than us trying to do inference on maybe-labels.
Expected Behavior
NA
Installed Versions
Replace this line with the output of pd.show_versions()
The text was updated successfully, but these errors were encountered:
lithomas1
added
Indexing
Related to indexing on series/frames, not to indexes themselves
Series
Series data structure
and removed
Needs Triage
Issue that has not been reviewed by a pandas team member
labels
Jan 11, 2024
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
In this example the user wants to treat (1,2) as a scalar label but doing so fails. I'd be open to "the user shouldn't do this". Otherwise I think something like #42349 to make users be explicit when they want to do something ugly like this is probably simpler than us trying to do inference on maybe-labels.
Expected Behavior
NA
Installed Versions
Replace this line with the output of pd.show_versions()
The text was updated successfully, but these errors were encountered: