(self, periods=1, freq=None, axis=0)
| 2022 | |
| 2023 | @derived_from(pd.DataFrame) |
| 2024 | def shift(self, periods=1, freq=None, axis=0): |
| 2025 | if not isinstance(periods, Integral): |
| 2026 | raise TypeError("periods must be an integer") |
| 2027 | |
| 2028 | axis = _validate_axis(axis) |
| 2029 | if axis == 0: |
| 2030 | return new_collection(Shift(self, periods, freq)) |
| 2031 | |
| 2032 | return self.map_partitions( |
| 2033 | func=Shift.func, |
| 2034 | enforce_metadata=False, |
| 2035 | transform_divisions=False, |
| 2036 | periods=periods, |
| 2037 | axis=axis, |
| 2038 | freq=freq, |
| 2039 | ) |
| 2040 | |
| 2041 | @derived_from(pd.DataFrame) |
| 2042 | def diff(self, periods=1, axis=0): |
nothing calls this directly
no test coverage detected