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

Method _constructor_from_mgr

pandas/core/series.py:609–620  ·  view source on GitHub ↗
(self, mgr, axes)

Source from the content-addressed store, hash-verified

607 return Series
608
609 def _constructor_from_mgr(self, mgr, axes):
610 ser = Series._from_mgr(mgr, axes=axes)
611 ser._name = None # caller is responsible for setting real name
612
613 if type(self) is Series:
614 # This would also work `if self._constructor is Series`, but
615 # this check is slightly faster, benefiting the most-common case.
616 return ser
617
618 # We assume that the subclass __init__ knows how to handle a
619 # pd.Series object.
620 return self._constructor(ser)
621
622 @property
623 def _constructor_expanddim(self) -> Callable[..., DataFrame]:

Callers 15

_sliceMethod · 0.95
_get_rows_with_maskMethod · 0.95
roundMethod · 0.95
_take_new_indexFunction · 0.45
applyMethod · 0.45
_reconstructFunction · 0.45
__neg__Method · 0.45
__pos__Method · 0.45
__invert__Method · 0.45
absMethod · 0.45
takeMethod · 0.45
_sliceMethod · 0.45

Calls 2

_constructorMethod · 0.95
_from_mgrMethod · 0.80

Tested by 1