shenwei356 / csvtk

A cross-platform, efficient and practical CSV/TSV toolkit in Golang
http://bioinf.shenwei.me/csvtk
MIT License
999 stars 84 forks source link

deduplicate columns #225

Closed avilella closed 1 year ago

avilella commented 1 year ago

Hi all,

One of the great uses of csvtk is the csvtk join command. I sometimes find myself joining two files that have a partial overlap in their columns, which ends with a joined result with some duplicated columns.

It would be great to have a csvtk deduplicate columns command, which looks at the header columns from left to right, and deletes the ones on the right that have already been seen.

Thanks for considering

tetedange13 commented 1 year ago

Hi @avilella ,

After issue #202, a commit introduced option to add filename when joining (I do not think this is available in a current release yet) => Maybe this can solve your issue partially ?

Hope this helps ! Kind regards, Felix.