-
-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Closed
Copy link
Labels
BugError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action
Description
The following
df2 = pd.DataFrame({"A": [1, 2, 3]}, index=['a', 'c', 'b'])
df2.loc['d':'e']
Should raise a KeyError
. This worked in the past (see #18531) but does not anymore. Question is if we should raise in slice_locs
if start and end are equal or if we should do this after calling the function.
cc @jreback
Metadata
Metadata
Assignees
Labels
BugError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action