.. 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)
| 2074 | |
| 2075 | @derived_from(pd.DataFrame) |
| 2076 | def diff(self, periods=1, axis=0): |
| 2077 | """ |
| 2078 | .. note:: |
| 2079 | |
| 2080 | Pandas currently uses an ``object``-dtype column to represent |
| 2081 | boolean data with missing values. This can cause issues for |
| 2082 | boolean-specific operations, like ``|``. To enable boolean- |
| 2083 | specific operations, at the cost of metadata that doesn't match |
| 2084 | pandas, use ``.astype(bool)`` after the ``shift``. |
| 2085 | """ |
| 2086 | axis = _validate_axis(axis) |
| 2087 | if axis == 0: |
| 2088 | return new_collection(Diff(self, periods)) |
| 2089 | return self.map_partitions( |
| 2090 | func=Diff.func, |
| 2091 | enforce_metadata=False, |
| 2092 | transform_divisions=False, |
| 2093 | clear_divisions=False, |
| 2094 | periods=periods, |
| 2095 | axis=axis, |
| 2096 | ) |
| 2097 | |
| 2098 | @derived_from(pd.DataFrame) |
| 2099 | def rename_axis( |