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 2437ce2 commit 9556aa4Copy full SHA for 9556aa4
pandas/core/generic.py
@@ -9713,12 +9713,11 @@ def _where(
9713
else:
9714
if not hasattr(cond, "shape"):
9715
cond = np.asanyarray(cond)
9716
- else:
9717
- cond = np.array(cond)
9718
cond[isna(cond)] = True
9719
if cond.shape != self.shape:
9720
raise ValueError("Array conditional must be same shape as self")
9721
cond = self._constructor(cond, **self._construct_axes_dict(), copy=False)
+ cond = cond.fillna(True)
9722
9723
# make sure we are boolean
9724
fill_value = bool(inplace)
0 commit comments