csvkitHow to select specific columns with csvkit?
csvkit is a suite of command-line tools for working with CSV, the most popular being csvcut. csvcut allows you to select specific columns from a CSV file.
Example code
csvcut -c 1,3,4 myfile.csv
Output example
column1,column3,column4
value1,value3,value4
value5,value7,value8
Code explanation
csvcut: the command to select specific columns from a CSV file-c: the flag to specify the columns to select1,3,4: the columns to select, in this case columns 1, 3, and 4myfile.csv: the CSV file to select columns from
Helpful links
More of Csvkit
- How to update specific records using csvkit?
 - How to split a csv file with csvkit?
 - How to remove duplicates with csvkit?
 - How to fetch unique values with csvkit?
 - How to remove columns with csvkit?
 - How to skip the first line with csvkit?
 - How to convert a tsv file to csv with csvkit?
 - How to join two files with csvkit?
 - How to install csvkit on a Mac?
 - How to remove header with csvkit?
 
See more codes...