csvkitHow to merge columns with csvkit?
csvkit is a suite of command-line tools for working with CSV files. It can be used to merge columns from multiple CSV files into a single file.
Example code
csvstack -n 1,2,3 file1.csv file2.csv > merged.csv
Output example
1,2,3
a,b,c
d,e,f
g,h,i
Code explanation
csvstack: the command to merge columns from multiple CSV files-n 1,2,3: the option to specify which columns to mergefile1.csvandfile2.csv: the two files to be merged> merged.csv: the output file
Helpful links
More of Csvkit
- How to split a csv file with csvkit?
- How to update specific records using csvkit?
- How to remove duplicates with csvkit?
- How to use csvkit on Windows?
- How to change the encoding in csvkit?
- How to install csvkit on Debian?
- How to convert JSON to CSV using csvkit?
- How to install csvkit on a Mac?
- How to fetch unique values with csvkit?
See more codes...