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
Feature Request: merge_asof with interpolation #22410
Comments
Thanks! I could see some utility here. Not sure how complicated the implementation would be but if you feel up for it PRs are always welcome! |
I just had a brief look, and it seems that Also, hypothetically, what would this entail exactly? Do the change above, plus write tests, plus write the docs for |
Not intimately familiar with the implementation so can’t advise on the former off the top of my head. Probably better served if you just submit a PR for review. As far a what that entails you have it covered and along with a what’s new note for 0.25 |
I would also like to have this feature. |
merge_asof
with interpolation would be a new feature. When you mergedf1
anddf2
, the merged columns ofdf2
would not be the exact "asof" values as indf2
, but the interpolated values (for example in a linearly time-weighted fashion).Define
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \ndf1
:
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \ndf2
:This is how
merge_asof
works:Returns:
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nAnd so
would return
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nmethod="last"
could reproduce default behaviour.This could also be reproduced by doing these operations manually:
The text was updated successfully, but these errors were encountered: