csvkitHow to merge multiple files with csvkit?
csvkit is a suite of command-line tools for working with CSV, the most popular being csvstack
. csvstack
can be used to merge multiple CSV files into a single file.
Example code
csvstack file1.csv file2.csv file3.csv > merged.csv
Output example
Merged file saved as merged.csv
Code explanation
csvstack
: the command used to merge multiple CSV filesfile1.csv
,file2.csv
,file3.csv
: the files to be merged>
: the output operator, used to save the merged file asmerged.csv
Helpful links
More of Csvkit
- How to convert a tsv file to csv with csvkit?
- How to skip the first line with csvkit?
- How to convert a csv file to tab delimited with csvkit?
- How to select specific columns with csvkit?
- How to convert JSON to CSV using csvkit?
- How to remove columns with csvkit?
- How to remove duplicates with csvkit?
- How to rename a column with csvkit?
- How to update specific records using csvkit?
- How to split a csv file with csvkit?
See more codes...