Skip to content

Commit fbe4adc

Browse files
committed
_setitem_frame(): use blk.dtype
1 parent 975387c commit fbe4adc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4281,7 +4281,7 @@ def _setitem_frame(self, key, value) -> None:
42814281
raise ValueError("Array conditional must be same shape as self")
42824282
key = self._constructor(key, **self._construct_axes_dict(), copy=False)
42834283

4284-
if key.size and not all(is_bool_dtype(dtype) for dtype in key.dtypes):
4284+
if key.size and not all(is_bool_dtype(blk.dtype) for blk in key._mgr.blocks):
42854285
raise TypeError(
42864286
"Must pass DataFrame or 2-d ndarray with boolean values only"
42874287
)

0 commit comments

Comments
 (0)