8000 BUG: ensure reindex / getitem to select columns properly copies data for extension dtypes by jorisvandenbossche · Pull Request #51197 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
BUG: ensure getitem to select columns properly copies data for extens…
…ion dtypes
  • Loading branch information
jorisvandenbossche committed Feb 6, 2023
commit 105b96bc294c487d06e483b394b98b359ebd2afa
2 changes: 1 addition & 1 deletion pandas/core/internals/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ def _slice_take_blocks_ax0(
# only one item and each mgr loc is a copy of that single
# item.
for mgr_loc in mgr_locs:
newblk = blk.copy(deep=False)
newblk = blk.copy(deep=not only_slice)
newblk.mgr_locs = BlockPlacement(slice(mgr_loc, mgr_loc + 1))
blocks.append(newblk)
refs.append(weakref.ref(blk))
Expand Down
0