-
Notifications
You must be signed in to change notification settings - Fork 157
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
Rolling aggregate support based on windows within a DT #1500
Comments
I'm going to remove lead/lag from here, since it is a separate feature, and deserves its own issue. The rolling functions are an important feature to add; there is a similar work being done in R data.table as well: Rdatatable/data.table#2778 |
The R data.table implementation (as of now rollmean) was designed to be R agnostic, so we should be able to reduce maintanence effort by reusing that code. |
@st-pasha Do you want me to raise a ticket about lead/lag? |
@atroiano Yes, please do. I guess the function name will be |
In R we use zoo or own implementation of rolling function with next syntax:
Is there way to implement with similar syntax? |
I'd like to see the ability to get different rolling aggregations of my dataset based on order and grouping columns. Pandas has robust support for these type of actions. https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.rolling.html.
It would also be nice to easily assign these to new columns without having to make nested for loops.
Below is a function I use in Pandas to achieve this functionality
Example code could be something like - df(select=mean(f.x), group="y",window = 3, align='r')
-group = windowing columns for the select statement
-window = many rows is looks back or forward in a given group
The text was updated successfully, but these errors were encountered: