Skip to content

Commit e2df2d0

Browse files
committed
Use astype instead of replace
1 parent 85f35e9 commit e2df2d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9746,7 +9746,7 @@ def _where(
97469746
raise ValueError("Array conditional must be same shape as self")
97479747
cond = self._constructor(cond, **self._construct_axes_dict(), copy=False)
97489748
if has_nan:
9749-
cond = cond.replace({0.0: False, 1.0: True})
9749+
cond = cond.astype(bool)
97509750
cond = cond.fillna(True)
97519751

97529752
# make sure we are boolean

0 commit comments

Comments
 (0)