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

Simplify usage of aggregation functions as window functions without group_by verb #17

Open
QuantCo-mr-T opened this issue Aug 19, 2023 · 0 comments

Comments

@QuantCo-mr-T
Copy link

Modifying the partition-by section of an over-clause is currently only possible with group_by/ungroup:

tbl >> group_by(a,b,c) >> mutate(agg_col=tbl.x.max()) >> ungroup() >> mutate(y=tbl.x - λ.agg_col)

It would be much nicer to configure this the same way as the order-by part of window functions:

tbl >> mutate(y=tbl.x - tbl.x.max(grouped=[a,b,c]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants