From ae22a0bbfb98bb345f978b2ec2577dca0d9e130f Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Wed, 12 Feb 2020 12:37:05 -0800 Subject: [PATCH] dont skip keyerror for IntervalIndex --- pandas/core/indexing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py index b3777e949a08c..a8d2a9348b244 100755 --- a/pandas/core/indexing.py +++ b/pandas/core/indexing.py @@ -1331,12 +1331,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 "