Skip to content

Commit ad7ae66

Browse files
Daniel SaxtonDaniel Saxton
Daniel Saxton
authored and
Daniel Saxton
committed
Fill NA
1 parent d3e7a69 commit ad7ae66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/indexing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,9 +2234,9 @@ def check_bool_indexer(index: Index, key) -> np.ndarray:
22342234
elif is_extension_array_dtype(key) and is_bool_dtype(key):
22352235
mask = isna(key)
22362236
if mask.any():
2237-
result = np.asarray(np.where(~mask, result, False), dtype=bool)
2237+
result = np.asarray(key.fillna(False), dtype=bool)
22382238
else:
2239-
result = np.asarray(result, dtype=bool)
2239+
result = np.asarray(key, dtype=bool)
22402240
else:
22412241
# key might be sparse / object-dtype bool, check_array_indexer needs bool array
22422242
result = np.asarray(result, dtype=bool)

0 commit comments

Comments
 (0)