Skip to content

Commit a3d0a2b

Browse files
committed
Fix manager
1 parent 47d85b3 commit a3d0a2b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pandas/core/internals/managers.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,11 @@ def astype(self: T, dtype, copy: bool = False, errors: str = "raise") -> T:
442442
return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
443443

444444
def convert(self: T, copy: bool | None) -> T:
445-
if not copy and using_copy_on_write():
446-
copy = False
447-
elif copy is None:
448-
copy = True
445+
if copy is None:
446+
if using_copy_on_write():
447+
copy = False
448+
else:
449+
copy = True
449450

450451
if self.is_single_block:
451452
original_blocks = [self.blocks[0]] * self.shape[0]

0 commit comments

Comments
 (0)