コード例 #1
0
ファイル: ops.py プロジェクト: micyhkim/pandas
 def _chop(self, sdata: Series, slice_obj: slice) -> Series:
     # fastpath equivalent to `sdata.iloc[slice_obj]`
     mgr = sdata._mgr.get_slice(slice_obj)
     ser = sdata._constructor(mgr, name=sdata.name, fastpath=True)
     return ser.__finalize__(sdata, method="groupby")
コード例 #2
0
ファイル: ops.py プロジェクト: NV2480/Projects-in-Python
 def _chop(self, sdata: Series, slice_obj: slice) -> Series:
     # fastpath equivalent to `sdata.iloc[slice_obj]`
     mgr = sdata._mgr.get_slice(slice_obj)
     # __finalize__ not called here, must be applied by caller if applicable
     return sdata._constructor(mgr, name=sdata.name, fastpath=True)