Skip to content

Commit b2ebd5a

Browse files
authored
dont skip keyerror for IntervalIndex (#31936)
1 parent 020dcce commit b2ebd5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/indexing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1302,12 +1302,12 @@ def _validate_read_indexer(
13021302
not_found = list(set(key) - set(ax))
13031303
raise KeyError(f"{not_found} not in index")
13041304

1305-
# we skip the warning on Categorical/Interval
1305+
# we skip the warning on Categorical
13061306
# as this check is actually done (check for
13071307
# non-missing values), but a bit later in the
13081308
# code, so we want to avoid warning & then
13091309
# just raising
1310-
if not (ax.is_categorical() or ax.is_interval()):
1310+
if not ax.is_categorical():
13111311
raise KeyError(
13121312
"Passing list-likes to .loc or [] with any missing labels "
13131313
"is no longer supported, see "

0 commit comments

Comments
 (0)