pytae
Pandas helpers for everyday data-science tasks (filtering, selection, reshaping, aggregation, plotting), plus a pytae CLI that exposes the same operations for inspecting and converting tabular files (.parquet, .csv, .txt, .dat, .sas7bdat) without writing any Python.
Install
pip install pytae # Core library and CLI
pip install "pytae[plot]" # Adds Plotter (matplotlib, scipy)
pip install "pytae[sql]" # Adds SQL engine (duckdb)
CLI
pytae data.parquet -head
pytae data.parquet -qry "species='Adelie'" -select "species,body_mass_g" -o subset.csv
pytae data.parquet -sql "select species, avg(body_mass_g) from data group by species"
pytae -file "data1.parquet=df1; data2.parquet=df2" -merge "left=df1,right=df2,on=id"
See docs/cli.md for the full CLI reference and flag guide, and docs/cli/multi_file.md for -file/-merge/-concat.
Plotting
Plotter: method-chainable plots on top of pandas.plot() (pip install pytae[plot]).
from pytae.plotting import Plotter
Plotter().data(penguins).plot(
x="bill_length_mm", y="bill_depth_mm", kind="scatter", c="species", cmap="viridis"
).finalize()
See docs/plotting.md for more examples with sample data.
Library
Import pytae as pt. Same verbs work as pt.select(df, ...) or as df.pt.select(...) (mix with pandas: df.rename(...).pt.agg_df(...)). Notebooks use the accessor chain. CLI flags (-select, -qry, …) are unchanged.
import pytae as pt
penguins = pt.sample("penguins")
pt.select(penguins, "species", contains="bill")
(penguins
.pt.agg_df(["species", "island"], a=["mean", "n"])
)
- Filtering —
pt.qry()/df.pt.qry(): string expressions, dicts, or keyword filters (equality, lists,in/not in, comparisons, intervals) - Selection —
pt.select(): columns by name, regex, dtype, or name pattern - Mutating —
pt.mutate(): create/overwrite columns via formulas, grouped window transformsby=,if_else(),case_when(),map() - Reshaping —
pt.long()/pt.wide(): melt numeric columns to rows, pivot back to columns - Aggregation —
pt.agg_df(): groups by explicitby=column(s) (orNonefor whole-table summary) and aggregates numeric columns - Utilities —
df.to_clip(),pt.handle_missing(),pt.cols(),pt.clean_columns(),pt.replace_values() - SQL —
pt.sql()/df.pt.sql()via duckdb (pip install pytae[sql]); the frame is tabledata
See docs/library.md for examples of each.
Key Conventions & Syntax Cheat Sheet
| Task | Syntax | Example |
|---|---|---|
| Copy to Clipboard | df.to_clip() in Python; -o clip in CLI |
df.head().to_clip() vs. pytae data.parquet -head -o clip |
| Mapping vs. Assignment | : maps old to new; = assigns values |
-rename "old:new" vs. -mutate "col = expr" |
| Spaced Columns (Filter) | Enclose in brackets [col] |
df.pt.qry("[bill length mm] > 40") |
| Spaced Columns (Select) | Enclose in brackets [col] |
df.pt.select("species", "[body mass g]") |
| Spaced Columns (Create) | String assignment [col] = ... (or **{...}) |
df.pt.mutate("[body mass kg] = body_mass_g / 1000") |
| Spaced Columns (Agg) | String mapping "[col] = func, n = n" |
df.pt.agg("smoker", "tip = mean, [total bill] = mean, n = n") |
| Spaced Columns (Expr) | Reference via brackets [col] or backticks `col` |
df.pt.mutate(ratio="[bill length mm] / [bill depth mm]") |
| Selective Grouping | agg_df groups by explicit by= column(s) |
df.pt.agg_df("species", "mean") |
License
MIT — see LICENSE.
Metadata
Release files for pytae 3.6.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.6.0.tar.gz | 2.9 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytae-3.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.7 MB
Release files / pytae-3.6.0.tar.gz
| Download URL | pytae-3.6.0.tar.gz |
|---|---|
| Size | 2.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1b1bdb0c38b751cbc77f516a57ad6b92f1a61e955d95bfaa1ba86fdb770acb7
|
|
BLAKE2b-256 checksum How to use checksums |
38c9a8fa289851239721776abf413a70aabf203b046eb7a1fc4b7e800fdf4c1b
|
| 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.6.0-py3-none-any.whl
| Download URL | pytae-3.6.0-py3-none-any.whl |
|---|---|
| Size | 1.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f79acb8c75637940997902d6b8d8128a00815a9cd6a0869b3f527ce4e2e54ab
|
|
BLAKE2b-256 checksum How to use checksums |
1737aa85377c649066b28911e5f60517fb2ebda3d6229f0b584812e8871ddf06
|
| 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.6.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.