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

group by #1764

Open
ggrothendieck opened this issue Apr 21, 2024 · 1 comment
Open

group by #1764

ggrothendieck opened this issue Apr 21, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ggrothendieck
Copy link

For increased expressiveness and consistency it would be nice if every subcommand for which it makes sense had a group by flag specifying which columns to group by. Conceptually this amounts to splitting into disjoint sets of rows, applying the subcommand to each set and putting it back together. 

Another possibility would be to have a group by subcommand which takes another qsv command or even non-qsv command as arguments. This would be more powerful but likely slower.

These are the subcommands that seem relevant:

enum
count
frequency
luau
pseudo
reverse
sample
slice
sort
sortcheck
transpose

@jqnatividad
Copy link
Owner

jqnatividad commented Apr 21, 2024

Thanks for this detailed request @ggrothendieck .

I agree that this would be a powerful addition to qsv.

For the initial implementation, I'd go with the second option by creating a new groupby command.

In later releases, we can build on the groupby command and use it as a common option in a manner akin to the select command and the --select common option used throughout the qsv suite.

@jqnatividad jqnatividad added the enhancement New feature or request label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants