def diff(self, periods=1):
        result = algos.diff(_values_from_object(self), periods)
        return self._constructor(result, index=self.index).__finalize__(self)
1st discrete difference of object
dataset/ETHPy150Open pydata/pandas/pandas/core/series.py/Series.diff