modin/pandas/series.py
def slice_shift(self, periods=1, axis=0):  # noqa: PR01, RT01, D200
        """
        Equivalent to `shift` without copying data.
        """
        if periods == 0:
            return self.copy()

        if axis == "index" or axis == 0:
            if abs(periods) >= len(self.index):
                return Series(dtype=self.dtype)
            else:
                new_df = self.iloc[:-periods] if periods > 0 else self.iloc[-periods:]
                new_df.index = (
                    self.index[periods:] if periods > 0 else self.index[:periods]
                )
                return new_df
        else:
            raise ValueError(
                "No axis named {axis} for object type {type}".format(
                    axis=axis, type=type(self)
                )
            )

        Equivalent to `shift` without copying data.
        
Equivalent to `shift` without copying data.
Equivalent to ` shift ` without copying data .
def slice_shift(self, periods=1, axis=0):  
        if periods == 0:
            return self.copy()
        if axis == "index" or axis == 0:
            if abs(periods) >= len(self.index):
                return Series(dtype=self.dtype)
            else:
                new_df = self.iloc[:-periods] if periods > 0 else self.iloc[-periods:]
                new_df.index = (
                    self.index[periods:] if periods > 0 else self.index[:periods]
                )
                return new_df
        else:
            raise ValueError(
                "No axis named {axis} for object type {type}".format(
                    axis=axis, type=type(self)
                )
            )
def slice_shift ( self , periods = 1 , axis = 0 ) : if periods == 0 : return self . copy ( ) if axis == "index" or axis == 0 : if abs ( periods ) >= len ( self . index ) : return Series ( dtype = self . dtype ) else : new_df = self . iloc [ : - periods ] if periods > 0 else self . iloc [ - periods : ] new_df . index = ( self . index [ periods : ] if periods > 0 else self . index [ : periods ] ) return new_df else : raise ValueError ( "No axis named {axis} for object type {type}" . format ( axis = axis , type = type ( self ) ) )
Equivalent to `shift` without copying data.
Equivalent to ` shift ` without copying data .
# noqa: PR01, RT01, D200 """
        Equivalent to `shift` without copying data.
        """
self
periods
axis