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.1.0.tar.gz (28.5 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.1.0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: peppermint_lang-0.1.0.tar.gz
  • Upload date:
  • Size: 28.5 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.1.0.tar.gz
Algorithm Hash digest
SHA256 67ddba5167159d43a7af8b1644797cf245ae74208e906c13db2d44ad25dafa95
MD5 9514b1570feeb9ae544804d230d2e09c
BLAKE2b-256 440400bc00ec6aa1979869e3d7586cb2b0615af82740220349c90fd40f717ee7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for peppermint_lang-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 972a1f23244477da2da197b325e73c027356f49caaac429782fad230bded65a1
MD5 95076881c8dbd9c179ca3bd8573a2d2e
BLAKE2b-256 7b4498a7c93d03ad52a7bf621c370eaa5c8fb8fa58b46ccb4f0df89cacd2c612

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