Skip to content

Improving interpolate_na()'s limit argument #2392

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

Closed
dnowacki-usgs opened this issue Aug 30, 2018 · 0 comments · Fixed by #3302
Closed

Improving interpolate_na()'s limit argument #2392

dnowacki-usgs opened this issue Aug 30, 2018 · 0 comments · Fixed by #3302

Comments

@dnowacki-usgs
Copy link
Contributor

I've been working with some time-series data with occasional nans peppered throughout. I want to interpolate small gaps of nans (say, when there is a single isolated nan or perhaps a block of two) but leave larger blocks as nans. That is, it's not appropriate to fill large gaps, but it acceptable to do so for small gaps.

I was hoping interpolate_na() with the limit argument would do exactly this, but it turns out that if you specify, say, limit=2, it will fill the first two nans of nan-blocks of any length, no matter how long. There are definitely solutions for dealing with this, but it seems like a common issue, and has cropped up over on Pandas as well.

I'm not able to attempt tackling this right now, but I guess I wanted to put in a feature request for an additional argument to interpolate_na() that would do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant