What's the fastest way to merge multiple csv files by column?

后端 未结 5 802
长情又很酷
长情又很酷 2021-02-09 04:08

I have about 50 CSV files with 60,000 rows in each, and a varying number of columns. I want to merge all the CSV files by column. I\'ve tried doing this in MATLAB by transposing

5条回答
  •  北海茫月
    2021-02-09 05:01

    [...] transposing each csv file and re-saving to disk, and then using the command line to concatenate them [...]

    Sounds like Transpose-Cat-Transpose. Use paste for joining files horizontally.

    paste -d ',' a.csv b.csv c.csv ... > result.csv
    

提交回复
热议问题