We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3e7a69 commit ad7ae66Copy full SHA for ad7ae66
pandas/core/indexing.py
@@ -2234,9 +2234,9 @@ def check_bool_indexer(index: Index, key) -> np.ndarray:
2234
elif is_extension_array_dtype(key) and is_bool_dtype(key):
2235
mask = isna(key)
2236
if mask.any():
2237
- result = np.asarray(np.where(~mask, result, False), dtype=bool)
+ result = np.asarray(key.fillna(False), dtype=bool)
2238
else:
2239
- result = np.asarray(result, dtype=bool)
+ result = np.asarray(key, dtype=bool)
2240
2241
# key might be sparse / object-dtype bool, check_array_indexer needs bool array
2242
result = np.asarray(result, dtype=bool)
0 commit comments