Skip to content
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

DEPR/API: disallow ffill/bfill method in "interpolate" #53581

Closed
3 tasks done
jbrockmendel opened this issue Jun 9, 2023 · 0 comments · Fixed by #53607
Closed
3 tasks done

DEPR/API: disallow ffill/bfill method in "interpolate" #53581

jbrockmendel opened this issue Jun 9, 2023 · 0 comments · Fixed by #53607
Labels
Deprecate Functionality to remove in pandas Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Comments

@jbrockmendel
Copy link
Member

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

ser = pd.Series([1, 2, None, 4, 5])

res = ser.interpolate(method="ffill")
assert res.equals(ser.ffill())

Issue Description

It looks like NDFrame.interpolate with a ffill/bfill "method" is redundant with ffill/bfill. interpolate also has limit_direction and limit_area keywords that could plausibly make it behave differently, need to track down whether that is the case. If it is, would it make more sense to have those keywords in ffill/bfill?

There should be One Obvious Way to do ffill/bfill, so support for these keyword values should be deprecated.

Expected Behavior

NA

Installed Versions

Replace this line with the output of pd.show_versions()

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 9, 2023
@lithomas1 lithomas1 added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Deprecate Functionality to remove in pandas and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants