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 edc3bcf commit 975387cCopy full SHA for 975387c
pandas/core/generic.py
@@ -9732,9 +9732,9 @@ def _where(
9732
if not is_bool_dtype(cond):
9733
raise TypeError(msg.format(dtype=cond.dtype))
9734
else:
9735
- for _dt in [blk.dtype for blk in cond._mgr.blocks]:
9736
- if not is_bool_dtype(_dt):
9737
- raise TypeError(msg.format(dtype=_dt))
+ for block in cond._mgr.blocks:
+ if not is_bool_dtype(block.dtype):
+ raise TypeError(msg.format(dtype=block.dtype))
9738
if cond._mgr.any_extension_types:
9739
# GH51574: avoid object ndarray conversion later on
9740
cond = cond._constructor(
0 commit comments