Skip to main content

CSVBro

CSVBro is a command-line tool for viewing and analyzing CSV files using pandas DataFrames. It provides functionality to display specific columns, create pivot tables, output data in JSON format, sort, limit, and filter results.

  • Author: Ryan Gerard Wilson
  • Website: ryangerardwilson.com

1. Installation

To install csvbro, use pip:

pip install csvbro

This installs datasling and its dependencies.

2. Get Latest Version

To upgrade to the latest version of csvbro:

pip install --upgrade csvbro

3. Usage

Run the tool from the command line using:

csvbro <filename> [<command> [args]]

If no command is provided, the entire CSV is displayed as a DataFrame (with pandas' default truncation) unless ORDER_BY, LIMIT, or WHERE is specified.

The following commands are available:

  • SHOW: Display specified columns of the CSV.

    csvbro SHOW [ ...] [ORDER_BY <sort_column> [ASC|DESC]] [LIMIT ] [WHERE "

  • PIVOT: Create a pivot table with specified row, value, and aggregation function.

    csvbro PIVOT [] [ORDER_BY <sort_column> [ASC|DESC]] [LIMIT ] [WHERE "

    • Aggregation functions: SUM, COUNT, COUNT_UNIQUE, MEAN, MEDIAN
    • Note: SUM, MEAN, and MEDIAN require numeric values.
  • PIVOT with DECILES: Create a decile analysis of a column with 10 equal-width bins (D1 to D10).

    csvbro PIVOT DECILES([,IGNORE_OUTLIERS]) [<pivot_column>] [ORDER_BY <sort_column> [ASC|DESC]] [LIMIT ] [WHERE "

  • PIVOT with PERCENTILES: Create a percentile analysis of a column with 10 equal-count bins (P0, P10, ..., P90).

    csvbro PIVOT PERCENTILES([,IGNORE_OUTLIERS]) [<pivot_column>] [ORDER_BY <sort_column> [ASC|DESC]] [LIMIT ] [WHERE "

  • JSON: Output the DataFrame in JSON format.

    csvbro JSON [ORDER_BY <sort_column> [ASC|DESC]] [LIMIT ] [WHERE "

  • ORDER_BY: Sort the entire DataFrame by a column.

    csvbro ORDER_BY <sort_column> <ASC|DESC> [LIMIT ] [WHERE "

  • LIMIT: Limit the DataFrame to a specified number of rows.

    csvbro [WHERE "

  • WHERE: Filter and display the DataFrame.

    csvbro WHERE "

    • Condition syntax: column <operator> value [AND|OR condition] (e.g., "column1 > 0.3", "Col1 > 0.3 AND (Col2 > 0.5 OR Col9 > 1.2)")
    • Operators: =, >, <, >=, <=, !=, LIKE (for string containment)
    • Note: Numeric comparisons use float parsing; LIKE requires string columns and matches substrings (case-insensitive). Conditions must be enclosed in double quotes in the shell command.
  1. License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for csvbro 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for csvbro 0.0.5
File Size Uploaded Provenance Actions
csvbro-0.0.5.tar.gz 13.2 kB Without provenance Details for csvbro-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for csvbro 0.0.5
File Interpreter ABI Platform Actions
csvbro-0.0.5-py3-none-any.whl Python 3 none any Details for csvbro-0.0.5-py3-none-any.whl

Total release size: 28.7 kB

Release files / csvbro-0.0.5.tar.gz

Download URL csvbro-0.0.5.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
31ee3298972c0580d72534aa52c335d309e231eee385d39fb0bf39b3c152d7ec
BLAKE2b-256 checksum
How to use checksums
cffc60f9ccfa43bb340f750b766062f8ad02e9b5c4f7369826f68ac51923ebda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / csvbro-0.0.5-py3-none-any.whl

Download URL csvbro-0.0.5-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94e612baea02a841f7aacb19eccf48b2b07047982ad4123b7e34db2d88b446c3
BLAKE2b-256 checksum
How to use checksums
c7ea6c07e590022e85c2350f1b0db6d05bbc13ab82453ef9be22fc134ce7108b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Security for csvbro 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page