qsv icon indicating copy to clipboard operation
qsv copied to clipboard

easier rename

Open ondohotola opened this issue 1 year ago • 4 comments

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 avatar Sep 08 '23 10:09 ondohotola

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.

jqnatividad avatar Sep 08 '23 19:09 jqnatividad

Thanks, great,

Multiple --select ?

I.e. something like

qsv rename -s a A -s b B

would be be even cooler

Message ID: ***@***.***>

ondohotola avatar Sep 08 '23 19:09 ondohotola

Stale issue message

github-actions[bot] avatar Dec 25 '23 10:12 github-actions[bot]

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'

13minutes-yt avatar Mar 13 '24 16:03 13minutes-yt