-
Notifications
You must be signed in to change notification settings - Fork 370
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
Explain column-independent operations #3225
Conversation
I additionally expanded a section on indexing and iterating a grouped data frame. |
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.
Thanks! I've made many small comments.
I wonder whether "context-dependent" is explicit enough. The operation specification syntax is already context-dependent as it doesn't work outside of combine
/select
/transform
. And any function call can be thought as context-dependent as the result can vary a lot depending on what columns are present in the data, on whether a DataFrame
or a GroupedDataFrame
is passed... Not sure what a better term could be: maybe something which stresses that these look like function calls but are actually not? "pseudo-functions"? "dummy functions"? mock-functions"? Maybe there's already a term for this kind of pattern in other languages?
Co-authored-by: Milan Bouchet-Valat <[email protected]>
This term is used in dplyr https://dplyr.tidyverse.org/reference/context.html. I tried to think about a better name, but I really did not find a great proposal. I will ask on Slack for comments. |
The alternative names proposed on Slack are:
|
The PR is updated to use "column-independent operations" as it seems the least controversial option. |
@nalimilan - OK to merge this PR? Thank you! |
docs/src/man/split_apply_combine.md
Outdated
julia> [nrow(sdf) for sdf in gd] | ||
3-element Vector{Int64}: | ||
50 | ||
50 | ||
50 |
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.
Still relevant.
Co-authored-by: Milan Bouchet-Valat <[email protected]>
@nalimilan - what do you mean here? Could you please clarify? (GitHub does not show me what you refer to). You wanted me to put together all examples with printing number of rows for all groups in one place and I did this. |
Co-authored-by: Milan Bouchet-Valat <[email protected]>
Co-authored-by: Milan Bouchet-Valat <[email protected]>
Thank you! |
This PR adds additional explanation of context dependent expressions in operation specification syntax to make sure users know exactly how they work.
CC @yjunechoe @pdeffebach