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

easier rename #1292

Open
ondohotola opened this issue Sep 8, 2023 · 4 comments
Open

easier rename #1292

ondohotola opened this issue Sep 8, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@ondohotola
Copy link

ondohotola commented Sep 8, 2023

I occasionally have a CSV file with something like 80 columns and need to rename one or two of them, which is a real nuisance as I have to write the whole header line which (especially in a Makefile) becomes very difficult to read.

MILLER has something like rename 'col1,COL1,col7,COL7' ie renaming by pairs, allowing for subsets, and I wonder if that would not be a nice feature to have?

@ondohotola ondohotola changed the title easier rebane easier rename Sep 8, 2023
@jqnatividad jqnatividad added the enhancement New feature or request label Sep 8, 2023
@jqnatividad
Copy link
Owner

This would be a good feature to have.

I'll add a --select option that's widely used in qsv which should prove to be even more powerful/flexible than what MILLER provides.

@ondohotola
Copy link
Author

ondohotola commented Sep 8, 2023 via email

@jqnatividad jqnatividad self-assigned this Oct 25, 2023
Copy link

Stale issue message

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 1, 2024
@jqnatividad jqnatividad reopened this Jan 8, 2024
@13minutes-yt
Copy link

I just want to give some ideas considering renaming headers in qsv. To improve on rename, we can use replace with the following
cat taxi.csv |qsv replace -n -s 15 'date' 'My Date'
the drawback is it is searching the whole column15
Of course there is sed piping or awk or miller, but the one that I like to use is through teip like so
cat taxi.csv |teip -l 1 -- qsv replace -n -s 15 'date' 'My Date'

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

3 participants