csvkitHow to remove header with csvkit?
csvkit is a suite of command-line tools for working with CSV files. It can be used to remove headers from CSV files.
Example code
csvcut -n file.csv
This command will print out the column numbers and names of the header row.
To remove the header, use the following command:
csvcut -H -c <column numbers> file.csv
Where <column numbers>
is a comma-separated list of the column numbers that you want to keep.
For example, if you want to keep the first three columns, you would use:
csvcut -H -c 1,2,3 file.csv
This will output the CSV file without the header row.
Helpful links
More of Csvkit
- How to select specific columns with csvkit?
- How to rename a column with csvkit?
- How to fetch unique values with 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 merge columns with csvkit?
- How to remove duplicates with csvkit?
- How to skip the first line with csvkit?
- How to use csvkit on Windows?
See more codes...