A data analysis cli tool using polars lazyframes
Project description
pldatacli
A simple command-line tool for quick CSV data analysis.
Tech Stack
- Polars – fast DataFrame engine with lazy execution for efficient data processing
- Typer – modern CLI framework for building command-line interfaces
- Rich – beautiful terminal rendering for clean table output
Usage
Basic command
pldatacli FILE [OPTIONS]
Example file:
SampleSuperstore.csv
Filter rows
pldatacli SampleSuperstore.csv \
--filter "State=Texas"
Multiple filters:
pldatacli SampleSuperstore.csv \
--filter "State=Texas" \
--filter "Category=Furniture"
Group by columns
Single column:
pldatacli SampleSuperstore.csv \
--groupby Region
Multiple columns:
pldatacli SampleSuperstore.csv \
--groupby Region \
--groupby Category
Aggregations
pldatacli SampleSuperstore.csv \
--groupby Region \
--agg "Profit=sum"
Multiple aggregations:
pldatacli SampleSuperstore.csv \
--groupby Region \
--agg "Profit=sum,mean"
Multiple columns with aggregations:
pldatacli SampleSuperstore.csv \
--groupby Region \
--groupby Category \
--agg "Sales=sum,mean" \
--agg "Profit=sum"
Sorting
pldatacli SampleSuperstore.csv \
--groupby Region \
--agg "Profit=sum" \
--sort "Profit_sum:desc"
Multiple sorts:
pldatacli SampleSuperstore.csv \
--groupby Region \
--agg "Profit=sum" \
--sort "Region:asc" \
--sort "Profit_sum:desc"
Rounding results
Round float columns to 2 digits:
pldatacli SampleSuperstore.csv \
--groupby Region \
--agg "Profit=mean" \
--round 2
Custom rounding:
pldatacli SampleSuperstore.csv \
--groupby Region \
--agg "Profit=mean" \
--round 4
Full example
pldatacli SampleSuperstore.csv \
--groupby Region \
--groupby Category \
--agg "Profit=sum,mean" \
--sort "Profit_sum:desc" \
--round 2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pldatacli-0.1.0.tar.gz
(2.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pldatacli-0.1.0.tar.gz.
File metadata
- Download URL: pldatacli-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c54ee22c78ea64392280f03cd270b8ebd15d7998d4de3ef207db0dd43ca44c1
|
|
| MD5 |
d637c442d9231fdac527a1d551b18f01
|
|
| BLAKE2b-256 |
12f7ad929ec7136e9515176b9d5686dfc7048efc39f8b897aa5a1e6604bd9a0a
|
File details
Details for the file pldatacli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pldatacli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ca050f016c7219f5e41665cfa0757c68da6d15cfbd0dc972e7af48254dc95e3
|
|
| MD5 |
9e8071bb85ca70a7ad7642df16eb99c9
|
|
| BLAKE2b-256 |
f02724359d81217e69c5f17af10f5322124787374335d173e646e35c428a2368
|