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

Allow summary to specify fields fuzzily like with other subcommands #277

Open
4 tasks done
ynadji opened this issue May 30, 2024 · 2 comments
Open
4 tasks done

Allow summary to specify fields fuzzily like with other subcommands #277

ynadji opened this issue May 30, 2024 · 2 comments

Comments

@ynadji
Copy link
Contributor

ynadji commented May 30, 2024

Prerequisites

  • make sure you're are using the latest version by csvtk version
¡ csvtk version
csvtk v0.30.0

Describe your issue

  • describe the problem
  • provide a reproducible example

I wanted to get the max of every column in a wide dataset with csvtk summary, but had to specify each column by hand. I think being able to use fuzzy field (and operator!) matches would be pretty cool. Some examples:

# Give the max for every column.
¡ echo -e 'a,b,c\n1,2,3\n4,5,6\n7,8,9' | csvtk summary -f "*:max"
[ERRO] column "*" not existed in file: -

# What I need to manually do to make it work
¡ echo -e 'a,b,c\n1,2,3\n4,5,6\n7,8,9' | csvtk summary -f a:max -f b:max -f c:max
a:max,b:max,c:max
7.00,8.00,9.00

# Provide all summaries for column a
¡ echo -e 'a,b,c\n1,2,3\n4,5,6\n7,8,9' | csvtk summary -f "a:*"  
[ERRO] invalid operation: *. run "csvtk summary --help" for help

# Provide all summaries for all columns
¡ echo -e 'a,b,c\n1,2,3\n4,5,6\n7,8,9' | csvtk summary -f "*:*"  
[ERRO] invalid operation: *. run "csvtk summary --help" for help

Thank you

Thanks so much for this great tool! It's already helping me out a lot in my workflow :).

@shenwei356
Copy link
Owner

Sorry, I'm very busy recently. Let's leave it open for the future.

@ynadji
Copy link
Contributor Author

ynadji commented May 31, 2024

Sorry, I'm very busy recently. Let's leave it open for the future.

no problem of course! if it bothers me enough i'll try and implement it myself and send a PR 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants