@@ -1127,15 +1127,16 @@ def _validate_key(self, key, axis: Axis):
1127
1127
# slice of integers (only if in the labels)
1128
1128
# boolean not in slice and with boolean index
1129
1129
ax = self .obj ._get_axis (axis )
1130
- if isinstance (key , bool ) and not (
1131
- is_bool_dtype (ax .dtype )
1132
- or ax .dtype .name == "boolean"
1133
- or isinstance (ax , MultiIndex )
1134
- and is_bool_dtype (ax .get_level_values (0 ).dtype )
1135
- ):
1136
- raise KeyError (
1137
- f"{ key } : boolean label can not be used without a boolean index"
1138
- )
1130
+
1131
+ # if isinstance(key, bool) and not (
1132
+ # is_bool_dtype(ax.dtype)
1133
+ # or ax.dtype.name == "boolean"
1134
+ # or isinstance(ax, MultiIndex)
1135
+ # and is_bool_dtype(ax.get_level_values(0).dtype)
1136
+ # ):
1137
+ # raise KeyError(
1138
+ # f"{key}: boolean label can not be used without a boolean index"
1139
+ # )
1139
1140
1140
1141
if isinstance (key , slice ) and (
1141
1142
isinstance (key .start , bool ) or isinstance (key .stop , bool )
@@ -1306,8 +1307,8 @@ def _getitem_axis(self, key, axis: AxisInt):
1306
1307
if isinstance (key , slice ):
1307
1308
self ._validate_key (key , axis )
1308
1309
return self ._get_slice_axis (key , axis = axis )
1309
- elif com .is_bool_indexer (key ):
1310
- return self ._getbool_axis (key , axis = axis )
1310
+ # elif com.is_bool_indexer(key):
1311
+ # return self._getbool_axis(key, axis=axis)
1311
1312
elif is_list_like_indexer (key ):
1312
1313
# an iterable multi-selection
1313
1314
if not (isinstance (key , tuple ) and isinstance (labels , MultiIndex )):
0 commit comments