CLEVERCSV-STANDARDIZE(1)

NAME
clevercsv-standardize - Convert a CSV file to one that conforms to RFC-4180

SYNOPSIS

clevercsv standardize [-e ENCODING | --encoding=ENCODING] [-i | --in-place]
                      [-n NUM_CHARS | --num-chars=NUM_CHARS]
                      [-o OUTPUT | --output=OUTPUT] [-t | --transpose]
                      <path [path ...]>

DESCRIPTION

The standardize command can be used to convert a non-standard CSV file to the standard RFC-4180 format [1]. When using the --in-place option, the return code of CleverCSV can be used to check whether a file was altered or not. The return code will be 2 when the file was altered and 0 otherwise.

[1]: https://tools.ietf.org/html/rfc4180

OPTIONS

-h, --help
    show this help message and exit

-e, --encoding
    The file encoding of the given CSV file is automatically detected using chardet. While chardet is incredibly accurate, it is not perfect. In the rare cases that it makes a mistake in detecting the file encoding, you can override the encoding by providing it through this flag. For this command, the provided encoding will also be used for the output file(s). When only one encoding is given, it will be used for all files given on the command line. When multiple encodings are given, the number must correspond to the number of files provided as input.

-i, --in-place
    Standardize and overwrite the input file(s)

-n, --num-chars
    On large CSV files, dialect detection can sometimes be a bit slow due to the large number of possible dialects to consider. To alleviate this, you can limit the number of characters to use for detection.

    One aspect to keep in mind is that CleverCSV may need to read a specific number of characters to be able to correctly infer the dialect. For example, in the ``imdb.csv`` file in the GitHub repository, the correct dialect can only be found after at least 66 lines of the file are read. Therefore, if there is availability to run CleverCSV on the entire file, that is generally recommended.

-o, --output
    The output files to write the standardized input files to. The order of the input files and the order of the output files should match if this option is used with more than one input file.

-t, --transpose
    Transpose the columns of the input file(s) before writing

<path>
    Path to one or more CSV file(s)

CLEVERCSV

Part of the CleverCSV suite