csvkitHow to rename a column with csvkit?
csvkit is a suite of command-line tools for working with CSV, the most popular being
To rename a column with csvkit, use the
csvrename command. For example, to rename the column "Name" to "Full Name" in the file
example.csv, use the following command:
csvrename -c Name,Full Name example.csv
This will output the following:
csvrename: the command to rename a column
-c: the flag to specify the column to rename
Name,Full Name: the original and new column names
example.csv: the file to be modified
More of Csvkit
- How to select specific columns with csvkit?
- How to split a csv file with csvkit?
- How to convert JSON to CSV using csvkit?
- How to skip the first line with csvkit?
- How to change the encoding in csvkit?
- How to use csvkit on Windows?
- How to fetch unique values with csvkit?
- How to convert a csv file to tab delimited with csvkit?
- How to sort a csv file with csvkit?
- How to reorder columns with csvkit?
See more codes...