-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate fill_method
and limit
in pct_change
APIs
#14277
Deprecate fill_method
and limit
in pct_change
APIs
#14277
Conversation
@@ -2298,9 +2304,15 @@ def pct_change( | |||
Periods to shift for forming percent change. | |||
fill_method : str, default 'ffill' | |||
How to handle NAs before computing percent changes. | |||
|
|||
.. deprecated:: 23.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So recently, supported was added back for fill_method=None
which means "don't fill the NA values" pandas-dev/pandas#55527
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, updated 👍
FutureWarning, | ||
) | ||
|
||
if fill_method in (no_default, None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would expect to skip the fillna
step if fill_method=None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pandas appears to deviate in this case: https://github.com/pandas-dev/pandas/blob/v2.1.3/pandas/core/groupby/groupby.py#L5317
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah interesting. OK yeah best to match pandas here then
90788f2
into
rapidsai:pandas_2.0_feature_branch
Description
This PR deprecated
fill_method
andlimit
inSeries.pct_change
,DataFrame.pct_change
andGroupby.pct_change
This PR:
On
pandas_2.0_feature_branch
:Checklist