Metadata-Version: 2.4
Name: peppermint-lang
Version: 0.2.2
Summary: A pipe-first DSL for data and ML work
Author-email: Chayapatr Archiwaranguprok <pub@mit.edu>
License-Expression: MIT
Project-URL: Repository, https://github.com/chayapatr/peppermint
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: data
Requires-Dist: pandas; extra == "data"
Provides-Extra: ml
Requires-Dist: pandas; extra == "ml"
Requires-Dist: scikit-learn; extra == "ml"
Requires-Dist: umap-learn; extra == "ml"
Provides-Extra: viz
Requires-Dist: pandas; extra == "viz"
Requires-Dist: matplotlib; extra == "viz"
Requires-Dist: seaborn; extra == "viz"
Provides-Extra: all
Requires-Dist: pandas; extra == "all"
Requires-Dist: scikit-learn; extra == "all"
Requires-Dist: umap-learn; extra == "all"
Requires-Dist: matplotlib; extra == "all"
Requires-Dist: seaborn; extra == "all"
Dynamic: license-file

# Peppermint

A pipe-first DSL for data and ML work. Designed to be lightweight and readable, where every operation is a pipeline step, errors propagate automatically, and the heavy lifting happens internally so you don't have to worry about it.

## Install

```sh
pip install -e .
```

## Run

```sh
pep file.pep  # run a file
pep           # interactive REPL
```

## Example

```
load("survey.csv")
  |> filter(it.age > 18)
  |> add(score: it.income / it.age)
  |> sort(by: "score", dir: "desc")
  |> print()
```

```
load("survey.csv")
  |> group(by: "region") {
      |> agg(avg_score: mean(it.score), n: count())
  }
  |> sort(by: "avg_score", dir: "desc")
  |> print()
```

Each step prints a summary as it runs:

```
|> filter    → List  843 rows × 5 cols  (157 dropped)
|> add       → List  843 rows × 6 cols  (+score)
|> sort      → List  843 rows × 6 cols
```

See [docs/language.md](docs/language.md) for the full language reference and [examples/](examples/) for more.
