BurntSushi / xsv

A fast CSV command line toolkit written in Rust.
The Unlicense
10.29k stars 317 forks source link

Feature Request: deduplicate columns/extract unique columns #283

Open peterjc opened 2 years ago

peterjc commented 2 years ago

We can use the Unix command line tools sort and uniq to remove duplicate rows in plain text table, but I find myself wanting to do something similar with duplicated columns.

For example, after doing xsv join ... there will be at least one pair of duplicated columns (the values used for the join).

I am hoping for something like a column based version of the row based dedup command proposed on #83 (see https://github.com/jqnatividad/qsv/issues/26 on the qsv fork).

I suspect I could workaround this via the proposed transpose command (see #137 / #146), which has been merged in the qsv fork.