table of contents
CLEVERCSV-CODE(1) | Clevercsv Manual | CLEVERCSV-CODE(1) |
NAME¶
clevercsv-code - Generate Python code to import a CSV file
SYNOPSIS¶
clevercsv code [-e ENCODING | --encoding=ENCODING]
[-n NUM_CHARS | --num-chars=NUM_CHARS] [-p | --pandas] <path>
DESCRIPTION¶
Generate Python code for importing a given CSV file. This is especially useful if you don't want to repeatedly detect the dialect of the same file. Simply run:
and copy the generated code to a Python script.
OPTIONS¶
-h, --help
-e, --encoding
-n, --num-chars
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.
-p, --pandas
<path>
CLEVERCSV¶
Part of the CleverCSV suite
2023-09-24 | Clevercsv 0.8.2 |