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
CLI
pytae data.parquet -head
pytae data.parquet -qry "species='Adelie'" -select "species,body_mass_g" -convert -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/FLAGS.md for which flag to use, docs/CLI.md for the full reference, 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.select("species", "island", "bill_length_mm", "body_mass_g")
.pt.agg_df(a=["mean", "n"])
)
- Filtering —
pt.qry(): 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,if_else(),case_when(),map() - Reshaping —
pt.long()/pt.wide(): melt numeric columns to rows, pivot back to columns - Aggregation —
pt.agg_df(): auto-detects group columns and aggregates the rest - Utilities —
pt.to_clip(),pt.handle_missing(),pt.cols(),pt.group_x(),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.
License
MIT — see LICENSE.
Release files for pytae 3.5.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 | |
|---|---|---|---|
| pytae-3.5.0.tar.gz | 2.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytae-3.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.2 MB
Release files / pytae-3.5.0.tar.gz
| Download URL | pytae-3.5.0.tar.gz |
|---|---|
| Size | 2.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ce37d988b5aa4b6c82d8611fbae171a433fd0c7a65f72fca722e138fb8fa67b
|
|
BLAKE2b-256 checksum How to use checksums |
ea6296de499b299ebb8e5e641b747c910858641f37a14d4f56e980a162ba2d48
|
| 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.5.0-py3-none-any.whl
| Download URL | pytae-3.5.0-py3-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50c8d7c47663bf232ed78101bf78649a14d25f067ef7258b08c50dbd8eee9d56
|
|
BLAKE2b-256 checksum How to use checksums |
94fccdec354c1f71b3b907d5e072b6b28ce6a2c22d870222e7feec6da307bbc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|