Forrest logo
tool overview
On this page you find all important commands for the CLI tool csvstat. If the command you are looking for is missing please ask our AI.

csvstat

The command line tool csvstat is a powerful tool used for quickly analyzing CSV (Comma-Separated Values) files. It provides various statistical insights and summary information about the data contained within the CSV file.

Here are some key features and capabilities of csvstat:

  1. Summary Statistics: csvstat can generate statistical summary information like count, mean, minimum, maximum, standard deviation, and more for each column in the CSV file.

  2. Data Types: It automatically detects the data types of each column, such as string, integer, floating point number, boolean, or date.

  3. Column Statistics: csvstat can calculate column-specific statistics like unique values, frequency distribution, and the most common values in a column.

  4. Column Constraints: It can analyze constraints on columns, such as checking if a column contains only unique values or if a column contains valid URLs, email addresses, or IP addresses.

  5. Metadata: csvstat extracts metadata like file size, encoding, line count, delimiter, and the total number of columns in the CSV file.

  6. JSON Output: It can produce the analysis results in JSON format, making it easier to parse and integrate with other tools or programs.

  7. Command Line Interface (CLI): csvstat can be used directly from the command line, making it convenient for scripting, automation, or integration into data processing pipelines.

  8. Cross-platform Compatibility: It is a cross-platform tool, available for Windows, macOS, and Linux operating systems.

csvstat is a useful tool for data analysts, data scientists, and anyone who needs to quickly understand and analyze the contents of CSV files without the need for complex programming or data manipulation.

List of commands for csvstat:

  • csvstat:tldr:28630 csvstat: Show all stats for all columns.
    $ csvstat ${data-csv}
    try on your machine
    explain this command
  • csvstat:tldr:5054d csvstat: Show sums for all columns.
    $ csvstat --sum ${data-csv}
    try on your machine
    explain this command
  • csvstat:tldr:a0f7d csvstat: Show all stats for columns 2 and 4.
    $ csvstat -c ${2,4} ${data-csv}
    try on your machine
    explain this command
  • csvstat:tldr:d96cf csvstat: Show the max value length for column 3.
    $ csvstat -c ${3} --len ${data-csv}
    try on your machine
    explain this command
  • csvstat:tldr:fc8c1 csvstat: Show the number of unique values in the "name" column.
    $ csvstat -c ${name} --unique ${data-csv}
    try on your machine
    explain this command
tool overview