Skip to content

Commit d35646f

Browse files
TST: parametrize CoW indexing tests for extension (nullable) dtypes (#51208)
1 parent 9a7bfe6 commit d35646f

File tree

4 files changed

+178
-61
lines changed

4 files changed

+178
-61
lines changed

pandas/core/internals/managers.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -838,8 +838,9 @@ def _slice_take_blocks_ax0(
838838
# A non-consolidatable block, it's easy, because there's
839839
# only one item and each mgr loc is a copy of that single
840840
# item.
841+
deep = not (only_slice or using_copy_on_write())
841842
for mgr_loc in mgr_locs:
842-
newblk = blk.copy(deep=not only_slice)
843+
newblk = blk.copy(deep=deep)
843844
newblk.mgr_locs = BlockPlacement(slice(mgr_loc, mgr_loc + 1))
844845
blocks.append(newblk)
845846

0 commit comments

Comments
 (0)