Skip to content

Commit 309216c

Browse files
committed
boolean mask guaranteed if None
1 parent e7dad7e commit 309216c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/core/missing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ def mask_missing(arr, values_to_mask):
6868
else:
6969
mask |= isna(arr)
7070

71+
# GH 21977
72+
if mask is None:
73+
mask = np.zeros(arr.shape, dtype=bool)
74+
7175
return mask
7276

7377

0 commit comments

Comments
 (0)