Metadata-Version: 2.5
Name: pytae
Version: 3.2.0
Summary: A package to enhance common tasks in data and plotting
Project-URL: Homepage, https://github.com/maddytae/pytae
Project-URL: Bug Tracker, https://github.com/maddytae/pytae/issues
Project-URL: CLI Docs, https://github.com/maddytae/pytae/blob/master/docs/CLI.md
Project-URL: Library Docs, https://github.com/maddytae/pytae/blob/master/docs/LIBRARY.md
Author-email: Madhukar Kumar Jha <madhukar.k.jha@gmail.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Requires-Dist: pandas>=2.0
Requires-Dist: pyarrow>=15.0.0
Provides-Extra: dev
Requires-Dist: duckdb>=0.9; extra == 'dev'
Requires-Dist: matplotlib; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Provides-Extra: notebooks
Requires-Dist: ipykernel; extra == 'notebooks'
Requires-Dist: nbclient; extra == 'notebooks'
Requires-Dist: nbformat; extra == 'notebooks'
Requires-Dist: scipy; extra == 'notebooks'
Provides-Extra: plot
Requires-Dist: matplotlib; extra == 'plot'
Provides-Extra: sql
Requires-Dist: duckdb>=0.9; extra == 'sql'
Description-Content-Type: text/markdown

# pytae

[![PyPI](https://img.shields.io/pypi/v/pytae.svg)](https://pypi.org/project/pytae/)
[![Python](https://img.shields.io/pypi/pyversions/pytae.svg)](https://pypi.org/project/pytae/)
[![CI](https://github.com/maddytae/pytae/actions/workflows/ci.yml/badge.svg)](https://github.com/maddytae/pytae/actions/workflows/ci.yml)
[![License](https://img.shields.io/pypi/l/pytae.svg)](https://github.com/maddytae/pytae/blob/master/LICENSE)

Pandas extensions 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

```bash
pip install pytae
```

## Library

Pandas extensions registered on `pd.DataFrame` — import `pytae` and the methods attach automatically.

- **Plotting** — `Plotter`: method-chainable plots on `pandas.plot` (`pip install pytae[plot]`)
- **Filtering** — `qry()`: dict-based filters (equality, lists, `in`/`not in`, comparisons, intervals)
- **Selection** — `select()`: columns by name, regex, dtype, or name pattern
- **Reshaping** — `long()` / `wide()`: melt numeric columns to rows, pivot back to columns
- **Aggregation** — `agg_df()`: auto-detects group columns and aggregates the rest
- **Utilities** — `to_clip()`, `handle_missing()`, `cols()`, `group_x()`

See [docs/LIBRARY.md](https://github.com/maddytae/pytae/blob/master/docs/LIBRARY.md) for examples of each.

## CLI

```bash
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 df group by species"
```

See [docs/CLI.md](https://github.com/maddytae/pytae/blob/master/docs/CLI.md) for the full flag reference.

## Development

```bash
pip install -e ".[dev,notebooks]"
pytest                                        # unit tests
git config core.hooksPath .githooks           # run notebooks/*.ipynb before each commit
python scripts/run_notebooks.py               # or run the notebook check manually
```

Notebooks are intentionally not part of the `pytest` suite (they're slower and exercise plotting/IO end-to-end); the pre-commit hook is the enforcement point instead.

## License

MIT — see [LICENSE](https://github.com/maddytae/pytae/blob/master/LICENSE).
