-
Notifications
You must be signed in to change notification settings - Fork 55
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
add groupby and docs #373
add groupby and docs #373
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I would recommend to make it more precise how args...
are transformed to a single argument to groupby
as it was not fully clear to me. What if someone e.g. writes
@groupby(df, Cols(r"a"), Not("b"))
.
7bfd448
to
237462f
Compare
@bkamins Ready for a review. I opted against adding any escaping rules for
|
Thanks! |
Adding a
@groupby
convenience macro has been suggested before (though I can't find the exact issues). Currently, you have to writeThe extra
[
and the lack of@
is frustrating and gets you out of the "flow" of a chained operation.This PR allows
which is cleaner
This macro also provides a few convenience syntaxes
String
andSymbol
column selectorsUnlike DataFrameMacros.jl's
@groupby
is does not allow for new column creation. This is intentional. I don't want@groupby
to create any copies or have any ambiguity about when it creates a copy, which DataFrameMacros.jl's@groupby
does (see here)`.With my implementation, users can mindlessly write
@groupby
without worrying about performance at all.