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 fetch unique values with csvkit?
- How to convert JSON to CSV using csvkit?
- How to convert a tsv file to csv with csvkit?
- How to split a csv file with csvkit?
- How to reorder columns with csvkit?
- How to change the encoding in csvkit?
- How to group by in csvkit?
- How to update specific records using csvkit?
- How to merge multiple files with csvkit?
See more codes...