Skip to content

dont skip keyerror for IntervalIndex #31936

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

Merged
merged 3 commits into from
Feb 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pandas/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,12 +1334,12 @@ def _validate_read_indexer(
not_found = list(set(key) - set(ax))
raise KeyError(f"{not_found} not in index")

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