Skip to main content

pytae

PyPI Python CI License

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 command-line and Python library.

pytae delivers one and only one obvious way to work with tabular data:

  1. Unix Pipeline CLI (pytae): Blazing-fast multithreaded SIMD vector engine sharing the exact same Polars core. Inspect tabular files (.parquet, .csv, .tsv, .jsonl, .sas7bdat, .gz), filter, transform, aggregate, reshape, plot directly in the terminal, and execute ANSI SQL queries with zero boilerplate.
  2. Python Library (pt.DataFrame / df.pt): High-performance tabular data frame backed directly by Polars vector execution. Enter via pt(pd_df), pt(pl_df), pt.read_parquet("file.parquet"), or calling .pt off any Pandas or Polars DataFrame (.by(), .mutate(), .filter(), .arrange(), .agg(), .pivot(), .plot()).

👉 Quick Links: CLI Cheat Sheet & Cookbook | vs. Pandas | vs. dplyr | vs. SAS.


Installation

pip install pytae              # Polars-native CLI and Python library
pip install "pytae[plot]"       # Includes matplotlib for plotting

Quick Start: Command-Line (CLI)

Flags execute from left to right as an in-memory pipeline powered natively by Polars SIMD:

# 1. Instant zero-cost inspection (reads Parquet headers without loading rows)
pytae penguins.parquet -head 5

# 2. Filter, engineer features, sort, and export to snappy Parquet
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.parquet

# 3. In-terminal frequency table & ASCII bar visualization
pytae penguins.parquet -freq species -bar

# 4. Instant format conversion (SAS7BDAT to Parquet or CSV)
pytae legacy.sas7bdat -o clean.parquet

# 5. Dataset diff & numeric drift detection between pipelines
pytae yesterday.parquet -diff today.parquet -tol 1e-4

# 6. Stream piping from STDIN
cat data.csv | pytae - -fmt csv -filter "amount > 100" -shape

# 7. Grouped aggregation & ANSI SQL query
pytae penguins.parquet -by species -agg "avg_mass=body_mass_g:mean, total=count"
pytae sales.parquet -sql "select region, sum(revenue) from data group by 1"

👉 CLI Quick Reference: Cheat Sheet & Cookbook (Markdown) or run pytae -cheatsheet in your terminal! | Full CLI Command Guide: docs/detailed_docs/cli/


Quick Start: Python & Jupyter SDK

Need the same expressive verbs in Python scripts, Airflow, or Jupyter? import pytae as pt gives you the exact same superpowers:

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


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

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 via by, ties)

  • Distinct Rows: Notebook | CLI Guide (distinct, deduplication across column subsets, keep)

  • Table Reshaping: Notebook | CLI Guide (long, wide, pure 1-to-1 unmelting, unified rcva grammar)

  • 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, a matrices, flat 1D headers)

  • Aggregations & Grouping: Notebook | CLI Guide (by, agg, dropna=False zero 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(), -sql DuckDB/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.3

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

Source distribution (sdist)

Source distribution for pytae 3.10.3
File Size Uploaded Provenance
pytae-3.10.3.tar.gz 3.5 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 5.6 MB

Release files / pytae-3.10.3.tar.gz

Download URL pytae-3.10.3.tar.gz
Size 3.5 MB
Tags Source
SHA-256 checksum
How to use checksums
30bad08950f4ae478bef43c495111ce98a709f17c34a2af91e572c9f04533b30
BLAKE2b-256 checksum
How to use checksums
1c2083d7ed01750a9f54dbf3929346f8375ae492c381a1622e2f1a7b8b2c650a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pytae-3.10.3-py3-none-any.whl

Download URL pytae-3.10.3-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ae23b5dadec0fd0783dd8667ea4057288bcb97632dc34fe1643f3cbe65108152
BLAKE2b-256 checksum
How to use checksums
857994cc745d1570d19521e6ecb2ebb3a8e40906fdfa8cc37065c557def96bec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pytae 3.10.3

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.

Release history Release notifications | RSS feed

This release

3.10.3 This release

2 release files No provenance

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