Skip to content

Commit 2fdca20

Browse files
committed
Fix other usages of copy
1 parent dae8d9c commit 2fdca20

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/core/internals/managers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2184,7 +2184,7 @@ def setitem_inplace(self, indexer, value) -> None:
21842184
the dtype.
21852185
"""
21862186
if not self._has_no_reference(0):
2187-
self.blocks = (self._block.copy(),)
2187+
self.blocks = (self._block.copy(deep=True),)
21882188
self._reset_cache()
21892189

21902190
arr = self.array

pandas/core/series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ def __init__(
500500
if dtype is not None:
501501
data = data.astype(dtype=dtype)
502502
elif copy:
503-
data = data.copy()
503+
data = data.copy(deep=True)
504504
else:
505505
data = sanitize_array(data, index, dtype, copy)
506506
data = SingleBlockManager.from_array(data, index, refs=refs)

0 commit comments

Comments
 (0)