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

[pondering] Should mutate handle sliding window operations? #13

Open
talegari opened this issue May 19, 2022 · 0 comments
Open

[pondering] Should mutate handle sliding window operations? #13

talegari opened this issue May 19, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@talegari
Copy link
Member

First thoughts:

df.mutate({'rolling_3_sum': (np.sum, 'col_1')}, window = [-1, 1])

-1: start at one index before
1: end at one index after


df.mutate({'rolling_3_sum': lambda x: (x['col_1'] + x['col_2'])/2}, window = [-1, 1])

we should be having the entire dataframe context here.


https://davisvaughan.github.io/slider/
https://dbplyr.tidyverse.org/articles/translation-function.html#window-functions
https://pandas.pydata.org/docs/user_guide/window.html

@talegari talegari added the question Further information is requested label May 19, 2022
@talegari talegari added the enhancement New feature or request label Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants