.. note:: Pandas currently uses an ``object``-dtype column to represent boolean data with missing values. This can cause issues for boolean-specific operations, like ``|``. To enable boolean- specific operations, at the cost of metadata that does
(self, periods=1, axis=0)
| 2040 | |
| 2041 | @derived_from(pd.DataFrame) |
| 2042 | def diff(self, periods=1, axis=0): |
| 2043 | """ |
| 2044 | .. note:: |
| 2045 | |
| 2046 | Pandas currently uses an ``object``-dtype column to represent |
| 2047 | boolean data with missing values. This can cause issues for |
| 2048 | boolean-specific operations, like ``|``. To enable boolean- |
| 2049 | specific operations, at the cost of metadata that doesn't match |
| 2050 | pandas, use ``.astype(bool)`` after the ``shift``. |
| 2051 | """ |
| 2052 | axis = _validate_axis(axis) |
| 2053 | if axis == 0: |
| 2054 | return new_collection(Diff(self, periods)) |
| 2055 | return self.map_partitions( |
| 2056 | func=Diff.func, |
| 2057 | enforce_metadata=False, |
| 2058 | transform_divisions=False, |
| 2059 | clear_divisions=False, |
| 2060 | periods=periods, |
| 2061 | axis=axis, |
| 2062 | ) |
| 2063 | |
| 2064 | @derived_from(pd.DataFrame) |
| 2065 | def rename_axis( |