Skip to content

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

@talegari

Description

@talegari

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

Metadata

Metadata

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions