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 85f35e9 commit e2df2d0Copy full SHA for e2df2d0
pandas/core/generic.py
@@ -9746,7 +9746,7 @@ def _where(
9746
raise ValueError("Array conditional must be same shape as self")
9747
cond = self._constructor(cond, **self._construct_axes_dict(), copy=False)
9748
if has_nan:
9749
- cond = cond.replace({0.0: False, 1.0: True})
+ cond = cond.astype(bool)
9750
cond = cond.fillna(True)
9751
9752
# make sure we are boolean
0 commit comments