MCPcopy
hub / github.com/pandas-dev/pandas / copy

Method copy

pandas/core/internals/blocks.py:640–650  ·  view source on GitHub ↗

copy constructor

(self, *, deep: bool)

Source from the content-addressed store, hash-verified

638
639 @final
640 def copy(self, *, deep: bool) -> Self:
641 """copy constructor"""
642 values = self.values
643 refs: BlockValuesRefs | None
644 if deep:
645 values = values.copy()
646 refs = None
647 else:
648 values = values.view()
649 refs = self.refs
650 return type(self)(values, placement=self._mgr_locs, ndim=self.ndim, refs=refs)
651
652 # ---------------------------------------------------------------------
653 # Copy-on-Write Helpers

Callers 15

convertMethod · 0.95
_maybe_copyMethod · 0.95
_replace_regexMethod · 0.95
replace_listMethod · 0.95
_replace_coerceMethod · 0.95
putmaskMethod · 0.95
whereMethod · 0.95
fillnaMethod · 0.95
pad_or_backfillMethod · 0.95
interpolateMethod · 0.95
roundMethod · 0.95
convert_dtypesMethod · 0.45

Calls 1

viewMethod · 0.45

Tested by

no test coverage detected