Skip to content

Commit 018cfe6

Browse files
committed
Revert unrelated change
1 parent 1d4f726 commit 018cfe6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/core/internals/managers.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,10 @@ def setitem(self: T, indexer, value) -> T:
384384
return self.apply("setitem", indexer=indexer, value=value)
385385

386386
def putmask(self, mask, new, align: bool = True):
387-
if using_copy_on_write() and any(
388-
not self._has_no_reference_block(i) for i in range(len(self.blocks))
387+
if (
388+
using_copy_on_write()
389+
and self.refs is not None
390+
and not all(ref is None for ref in self.refs)
389391
):
390392
# some reference -> copy full dataframe
391393
# TODO(CoW) this could be optimized to only copy the blocks that would

0 commit comments

Comments
 (0)