pytae
Fast, ergonomic tabular data manipulation, feature engineering, and visualization powered natively by Polars for multithreaded computation and backed by Pandas & Matplotlib for plotting across both Python library and CLI.
pytae offers one and only one obvious way to perform tabular operations with zero code duplication:
- Python Library (
pt.DataFrame/df.pt): High-performance tabular data frame backed directly by Polars vector execution. Enter viapt(pd_df),pt(pl_df),pt.read_parquet("file.parquet"), or calling.ptoff any Pandas or Polars DataFrame. Once entered, chain verbs naturally without repeatedly calling.pt(.by(),.mutate(),.filter(),.arrange(),.agg(),.pivot(),.plot()). - Unix Pipeline CLI (
pytae): Blazing-fast multithreaded SIMD vector engine sharing the exact same Polars core. Ingests tabular files (.parquet,.csv,.tsv,.jsonl,.sas7bdat,.gz), filters, transforms, aggregates, reshapes, and executes analytical ANSI SQL queries (-sql) with zero boilerplate.
👉 New to Pytae? Check out the dedicated comparisons: vs. Pandas | vs. dplyr | vs. SAS.
Installation
pip install pytae # Polars-native library and CLI
pip install "pytae[plot]" # Includes matplotlib for plotting
Quick Start: Python Library (Polars-Powered)
Read directly with pt.read_parquet(), wrap existing data with pt(df), or chain off Pandas via .pt:
import pytae as pt
# Read directly with Polars-powered fast auto-detection
df = pt.read_parquet("sales_report.parquet")
# Or chain directly off pandas or polars - only one .pt call needed!
summary = (
df.filter("amount > 0")
.by("region")
.mutate(pct_total="amount / sum(amount)", prev_sale="shift(amount, 1)")
.arrange("amount desc")
.to_pandas() # or .to_polars(), .to_clip()
)
👉 Full Master Documentation Hub: docs/pytae.md
Quick Start: CLI (Polars-Powered)
Flags execute from left to right as an in-memory pipeline powered natively by Polars:
# 1. Zero-cost inspection (reads Parquet headers without loading rows)
pytae penguins.parquet -shape -head 5
# 2. Filter, engineer features, sort, and export
pytae penguins.parquet \
-filter "species = 'Adelie', body_mass_g > 3500" \
-mutate "mass_kg = body_mass_g / 1000" \
-arrange "mass_kg desc" \
-select "species,island,mass_kg" \
-o heavy_adelie.csv
# 3. Grouped aggregation & reshaping
pytae penguins.parquet -by species -agg "avg_mass=body_mass_g:mean, total=count"
# 4. Deduplicate rows across key columns
pytae penguins.parquet -distinct "species,island"
# 5. Polars SQL Query
pytae sales.parquet -sql "select region, sum(revenue) from data group by 1"
# 6. Fast dataset comparison
pytae current.parquet -diff baseline.parquet
👉 Full CLI & Library Guides: docs/pytae.md#detailed-documentation-directory
Visualizations & Dashboards (Powered by Pandas & Matplotlib)
Pytae follows a clean, pragmatic architecture: Compute in Polars, Visualize in Pandas.
While Polars provides multithreaded SIMD speed for filtering, feature engineering, and aggregation, Pandas and Matplotlib remain the undisputed industry standard for Python data visualization. Calling .plot() automatically converts the prepared data into a Pandas DataFrame and delegates directly to pandas.DataFrame.plot()—giving you 100% compatibility with all standard plot kinds, styling, and mosaic dashboarding without any manual conversion boilerplate:
import pytae as pt
penguins = pt.sample("penguins")
# 1. Method chaining: compute in Polars, visualize in Pandas
(
penguins
.filter("body_mass_g.notna()")
.by("species")
.agg(avg_mass="body_mass_g:mean")
.plot(kind="bar", x="species", y="avg_mass", title="Average Penguin Mass (g)")
.finalize(save="mass_by_species.png")
)
# 2. Multi-panel dashboard layouts (pt.Plotter with ASCII mosaics)
plotter = pt.Plotter("""
AAAB
AAAC
""", figsize=(12, 6))
plotter.add("A", penguins, kind="scatter", x="bill_length_mm", y="bill_depth_mm", color="species")
plotter.add("B", penguins.by("species").count(), kind="bar", x="species", y="n")
plotter.add("C", penguins, kind="box", y="body_mass_g", by="species")
plotter.finalize(title="Penguin Morphology Dashboard", save="dashboard.png")
On the command line, generate distribution charts directly in your terminal or save figures headlessly:
# In-terminal distribution histogram
pytae penguins.parquet -hist body_mass_g
# Headless plot generation
pytae penguins.parquet -by species -agg "avg_mass=body_mass_g:mean" \
-plot "kind=bar, x=species, y=avg_mass" -finalize "save=mass.png"
👉 Interactive Plotting Notebook & Guide: docs/detailed_docs/plotting/plotting.ipynb
Documentation Directory
Guides & Specifications
- Master Reference & Architecture Hub: docs/pytae.md
- Ecosystem Comparisons & Migration Guides:
Detailed Topic Guides (docs/detailed_docs/)
Comprehensive documentation split into two dedicated folders:
-
docs/detailed_docs/library/: Interactive, fully executed Jupyter Notebooks (.ipynb) -
docs/detailed_docs/cli/: In-depth Command Line Markdown manuals (.md) -
Data Ingestion & Sinks: Notebook | CLI Guide (
pt.read_*,pt.scan_*,write_*,-o,-od,-fmt,-progress) -
Feature Engineering: Notebook | CLI Guide (
mutate, formulas, sequential assignments,if_else,map,shift,@var) -
Row Filtering: Notebook | CLI Guide (
filter, intervals, set membership,or/and, callables, pushdown) -
Column Selection: Notebook | CLI Guide (
select, negative drops-col, regex, pattern matches, rename) -
Row Sorting: Notebook | CLI Guide (
arrange,-col,desc, bracketed spaced columns) -
Row Slicing: Notebook | CLI Guide (
arrange+head/tail, top/bottom N or proportion per group viaby, ties) -
Distinct Rows: Notebook | CLI Guide (
distinct, deduplication across column subsets,keep) -
Table Reshaping: Notebook | CLI Guide (
long,wide, pure 1-to-1 unmelting) -
Relational Joins & Stacking: Notebook | CLI Guide (
df.join(),pt.join(),pt.concat(),-join,-concat, colon keys,validate) -
2D Pivot Tables: Notebook | CLI Guide (
pivot,r, c, v, amatrices, flat 1D headers) -
Aggregations & Grouping: Notebook | CLI Guide (
by,agg,dropna=Falsezero data loss retention) -
Visualizations & Plotting: Notebook | CLI Guide (
df.plot(),-plot,-finalize, mosaic dashboards) -
Utilities & Inspection: Notebook | CLI Guide (
fillna,dropna,rename,diff,glimpse,clean) -
In-Pipeline SQL: Notebook | CLI Guide (
df.sql(),pt.sql(),-sqlDuckDB/Polars SQL engine) -
Multi-File Pipelines: Notebook | CLI Guide (
-file, multi-table pipelines, batch globbing, UNIX pipes)
License
MIT License. See LICENSE for details.
Metadata
Release files for pytae 3.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pytae-3.10.0.tar.gz | 3.4 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytae-3.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 MB
Release files / pytae-3.10.0.tar.gz
| Download URL | pytae-3.10.0.tar.gz |
|---|---|
| Size | 3.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32d245665d0509c220753f4cea363236f2ca3d266492b22fea7b47f6082060de
|
|
BLAKE2b-256 checksum How to use checksums |
0d35cef7ceb823230803e52a92033acdd7984dc8505f26e0e6d5c6550f0ea79f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pytae-3.10.0-py3-none-any.whl
| Download URL | pytae-3.10.0-py3-none-any.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
493a15f9e8ad97eba453d72fef57c208ceaf72548481e792ae909e7a7a46de71
|
|
BLAKE2b-256 checksum How to use checksums |
fc5cca4aea8269fc3cc0ef98247aff854e0cd8dd47dcb0cacba5ec573b18330c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for pytae 3.10.0
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.