From c4fba3fc368fd72512eff93dc17ffbf63e78591a Mon Sep 17 00:00:00 2001 From: Sheilah Date: Tue, 30 Nov 2021 17:22:13 -0800 Subject: [PATCH] create new pr --- python/cudf/cudf/core/dataframe.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/python/cudf/cudf/core/dataframe.py b/python/cudf/cudf/core/dataframe.py index c0cb6f1917f..902a78f34d9 100644 --- a/python/cudf/cudf/core/dataframe.py +++ b/python/cudf/cudf/core/dataframe.py @@ -6329,6 +6329,30 @@ def explode(self, column, ignore_index=False): return super()._explode(column, ignore_index) + def pct_change(self): + """ + Calculates the percent change between sequential elements + in the DataFrame. + + Parameters + ---------- + periods : int, default 1 + Periods to shift for forming percent change. + fill_method : str, default 'ffill' + How to handle NAs before computing percent changes. + limit : int, optional + The number of consecutive NAs to fill before stopping. + Not yet implemented. + freq : str, optional + Increment to use from time series API. + Not yet implemented. + + Returns + ------- + DataFrame + """ + pass + def __dataframe__( self, nan_as_null: bool = False, allow_copy: bool = True ):