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

ENH: add limit_area argument to ffill() method as interpolate( method='ffill', limit_area='inside') as been deprecated #56492

Closed
2 of 3 tasks
j-carson opened this issue Dec 13, 2023 · 3 comments · Fixed by #56531
Assignees
Labels
Enhancement Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone

Comments

@j-carson
Copy link

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

I am trying to clean up my FutureWarnings and there is no obvious replacement for interpolate( method='ffill', limit_area ='inside')

Feature Description

The limit_area argument to ffill() method would work as it does in the interpolate() method

Alternative Solutions

Maybe you could find the first and last row of valid data using notna() on the column and then null-out the rows that were accidentally filled by fillna?

Additional Context

The interpolate(method='ffill') is deprecated in issue #53581, but there is no provision made for users who were using limit_area = 'inside' in that PR

@j-carson j-carson added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 13, 2023
@rhshadrach
Copy link
Member

rhshadrach commented Dec 14, 2023

It looks like the current implementation could expose limit_area as it's implemented at the block level (including for EABackedBlock).

@jbrockmendel - any thoughts to expanding the keywords of ffill and bfill?

@rhshadrach rhshadrach added the Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate label Dec 14, 2023
@jbrockmendel
Copy link
Member

Looks like that might be necessary, yah

@rhshadrach rhshadrach removed the Needs Triage Issue that has not been reviewed by a pandas team member label Dec 14, 2023
@rhshadrach rhshadrach self-assigned this Dec 14, 2023
@rhshadrach rhshadrach added this to the 2.2 milestone Dec 14, 2023
@rhshadrach
Copy link
Member

I should have time to take this up, want to get it into 2.2 because the behavior elsewhere has already been deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants