Skip to main content

A pipe-first DSL for data and ML work

Project description

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

pip install -e .

Run

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 for the full language reference and examples/ for more.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peppermint_lang-0.2.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

peppermint_lang-0.2.0-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file peppermint_lang-0.2.0.tar.gz.

File metadata

  • Download URL: peppermint_lang-0.2.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for peppermint_lang-0.2.0.tar.gz
Algorithm Hash digest
SHA256 af9988bbcc3e1155f12d6c07af29126628b353d7cf4c9e9cc5aa7c7af319bf6b
MD5 8f97b0eeeebd58a15b7e6a2d2ce0cbbd
BLAKE2b-256 7c286663c301da43d2a08b9482758e7b9fe3b7a269ba5ecc89cb74e24782cc21

See more details on using hashes here.

File details

Details for the file peppermint_lang-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for peppermint_lang-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55c4ba9e158c34ac139307b74fa3a56433a48d95571938363e61cc4678b76684
MD5 f66fb85f3020be304182ef8ed35e2470
BLAKE2b-256 04d2fd6bbf21dc1bcb101737fa074bfa3e6eb632b99c467651f5daf3b1784b0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page