示例#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
 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)