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.1.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.1-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: peppermint_lang-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 b16ca4ff0f7e4898edf672d6649a7499e1bb9fde30dc7d8a5c3938631c221b72
MD5 2fd6a309fd65263bd62016ef8ccf7c13
BLAKE2b-256 b80bdff07a718a3118e8bfe4e45e12bb4bcd7280a494132180d9df1a3872f1ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for peppermint_lang-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 53c46c6092d4c1454aec0883687f4a5ecdf11b4b66a1ad472eff01263a9d4f11
MD5 076a92b6d69980bb22a550edd05fddea
BLAKE2b-256 08cd4d676f5df8005a9994b9fdf6937955c943450269c4288a08180ae38c4e00

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