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 88b0530 commit 044d0a9Copy full SHA for 044d0a9
pandas/core/generic.py
@@ -9715,12 +9715,10 @@ def _where(
9715
else:
9716
if not hasattr(cond, "shape"):
9717
cond = np.asanyarray(cond, dtype=object)
9718
- if not cond.flags.writeable:
9719
- cond.setflags(write=True)
9720
- cond[isna(cond)] = True
9721
if cond.shape != self.shape:
9722
raise ValueError("Array conditional must be same shape as self")
9723
cond = self._constructor(cond, **self._construct_axes_dict(), copy=False)
+ cond = cond.fillna(True)
9724
9725
# make sure we are boolean
9726
fill_value = bool(inplace)
0 commit comments