csvkitHow to update specific records using csvkit?
Updating specific records using csvkit can be done using the csvcut and csvjoin commands.
The csvcut command can be used to select specific columns from a CSV file. For example, the following command will select the columns name and age from the file example.csv:
csvcut -c name,age example.csv
The csvjoin command can be used to join two CSV files together. For example, the following command will join the file example.csv with the file update.csv on the column name:
csvjoin -c name example.csv update.csv
The output of this command will be a new CSV file with the columns from both example.csv and update.csv, with the records from update.csv replacing the records from example.csv with the same name value.
Helpful links
More of Csvkit
- How to use csvkit on Windows?
- How to convert a csv file to tab delimited with csvkit?
- How to merge columns with csvkit?
- How to change the delimiter in csvkit?
- How to skip the first line with csvkit?
- How to add a header to a CSV file using csvkit?
- How to extract a column from a CSV file using csvkit?
- How to diff two CSV files using csvkit?
- How to rename a column with csvkit?
- How to format a date in csvkit?
See more codes...