9951 explained code solutions for 126 technologies


csvkitHow to change the delimiter in csvkit?


The delimiter in csvkit can be changed using the csvformat command.

Example code

csvformat -D '|' input.csv > output.csv

This command will change the delimiter from the default comma (,) to a pipe (|) in the input.csv file and save the output to output.csv.

Code explanation

  • csvformat: the command used to change the delimiter
  • -D: the flag used to specify the delimiter
  • '|': the delimiter to be used
  • input.csv: the input file
  • output.csv: the output file

Helpful links

Edit this code on GitHub