Skip to main content

fmt

Reformats tabular data as CSV with an explicit dialect (delimiter, quote style, escape character, line endings).

# Change delimiter
undatum fmt data.csv --delimiter ";" --output output.csv

# Change quote style
undatum fmt data.csv --quote always --output output.csv

# Change escape character
undatum fmt data.csv --escape backslash --output output.csv

# Change line endings
undatum fmt data.csv --line-ending crlf --output output.csv

Without --output, CSV is written to stdout.

Options

FlagValuesDefault
--delimiterAny single character,
--quoteminimal, always, none, nonnumericminimal
--escapedouble, backslash, nonedouble
--line-endingunix, windows, crlf, macunix
--quotecharCSV quote characteriterabledata default "
--encodingText encodingutf8
--outputOutput pathstdout

Also accepts --table, --flatten-nested, --on-error, and --error-log (shared options).