We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de67bb7 commit 54b05d8Copy full SHA for 54b05d8
pandas/core/internals/blocks.py
@@ -2914,6 +2914,8 @@ def _replace_coerce(
2914
if convert:
2915
block = [b.convert(numeric=False, copy=True) for b in block]
2916
return block
2917
+ if convert:
2918
+ return [self.convert(numeric=False, copy=True)]
2919
return self
2920
2921
pandas/core/internals/managers.py
@@ -632,7 +632,7 @@ def comp(s, regex=False):
632
convert=convert,
633
regex=regex,
634
)
635
- if m.any():
+ if m.any() or convert:
636
new_rb = _extend_blocks(result, new_rb)
637
else:
638
new_rb.append(b)
0 commit comments