.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "CSVLOOK" "1" "Jul 12, 2024" "2.0.1" "csvkit" .SH NAME csvlook \- csvlook Documentation .SH DESCRIPTION .sp Renders a CSV to the command line in a Markdown\-compatible, fixed\-width format: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C usage: csvlook [\-h] [\-d DELIMITER] [\-t] [\-q QUOTECHAR] [\-u {0,1,2,3}] [\-b] [\-p ESCAPECHAR] [\-z FIELD_SIZE_LIMIT] [\-e ENCODING] [\-L LOCALE] [\-S] [\-\-blanks] [\-\-null\-value NULL_VALUES [NULL_VALUES ...]] [\-\-date\-format DATE_FORMAT] [\-\-datetime\-format DATETIME_FORMAT] [\-H] [\-K SKIP_LINES] [\-v] [\-l] [\-\-zero] [\-V] [\-\-max\-rows MAX_ROWS] [\-\-max\-columns MAX_COLUMNS] [\-\-max\-column\-width MAX_COLUMN_WIDTH] [\-\-max\-precision MAX_PRECISION] [\-\-no\-number\-ellipsis] [\-y SNIFF_LIMIT] [\-I] [FILE] Render a CSV file in the console as a Markdown\-compatible, fixed\-width table. positional arguments: FILE The CSV file to operate on. If omitted, will accept input as piped data via STDIN. optional arguments: \-h, \-\-help show this help message and exit \-\-max\-rows MAX_ROWS The maximum number of rows to display before truncating the data. \-\-max\-columns MAX_COLUMNS The maximum number of columns to display before truncating the data. \-\-max\-column\-width MAX_COLUMN_WIDTH Truncate all columns to at most this width. The remainder will be replaced with ellipsis. \-\-max\-precision MAX_PRECISION The maximum number of decimal places to display. The remainder will be replaced with ellipsis. \-\-no\-number\-ellipsis Disable the ellipsis if \-\-max\-precision is exceeded. \-y SNIFF_LIMIT, \-\-snifflimit SNIFF_LIMIT Limit CSV dialect sniffing to the specified number of bytes. Specify \(dq0\(dq to disable sniffing entirely, or \(dq\-1\(dq to sniff the entire file. \-I, \-\-no\-inference Disable type inference when parsing the input. This disables the reformatting of values. .ft P .fi .UNINDENT .UNINDENT .sp If a table is too wide to display properly try piping the output to \fBless \-S\fP or truncating it using \fI\%csvcut\fP\&. .sp If the table is too long, try filtering it down with grep or piping the output to \fBless\fP\&. .sp See also: \fI\%Arguments common to all tools\fP\&. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 The fractional part of a decimal numberal is always truncated. To control this truncation, use \fB\-\-no\-inference\fP along with \fB\-\-max\-column\-width\fP\&. .UNINDENT .UNINDENT .SH EXAMPLES .sp Basic use: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C csvlook examples/testfixed_converted.csv .ft P .fi .UNINDENT .UNINDENT .sp This tool is especially useful as a final operation when piping through other tools: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C csvcut \-c 9,1 examples/realdata/FY09_EDU_Recipients_by_State.csv | csvlook .ft P .fi .UNINDENT .UNINDENT .sp If a data row contains more cells than the header row, csvlook will error. Use \fI\%csvclean\fP to remove such rows. .sp To ignore the extra cells, instead: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C csvcut \-C \(dq\(dq examples/bad.csv | csvlook .ft P .fi .UNINDENT .UNINDENT .sp If these rows are at the top of the file (for example, copyright notices), you can skip the rows: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C csvlook \-\-skip\-lines 1 examples/bad.csv .ft P .fi .UNINDENT .UNINDENT .sp This error can also occur if csvlook incorrectly deduces (\(dqsniffs\(dq) the CSV format. To disable CSV sniffing, set \fB\-\-snifflimit 0\fP and then, if necessary, set the \fB\-\-delimiter\fP and \fB\-\-quotechar\fP options yourself. Or, set \fB\-\-snifflimit \-1\fP to use the entire file as the sample, instead of the first 1024 bytes. .SH AUTHOR Christopher Groskopf and contributors .SH COPYRIGHT 2016, Christopher Groskopf and James McKinney .\" Generated by docutils manpage writer. .