Skip to main content

A pipeline-oriented data transformation DSL for Python and Jupyter

Project description

Pivotal

Pivotal is a data analysis language for Python. It offers a concise syntax for common data operations that compiles to Pandas, Polars or DuckDB code. With comprehensive JupyterLab and VS Code support (syntax highlighting, autocomplete, interactive viewer and GUI controls) Pivotal provides a friendly entry point to the Python data ecosystem.


A live-demo of Pivotal in Jupyter Lab is available via Binder:

JupyterLab demo

Features

Readable, writable syntax — write data transformations in a concise declarative syntax that feels familiar to SQL and Pandas users

Multiple backends — compile to Pandas, Polars, or in-process DuckDB SQL

JupyterLab and VS Code integration — syntax highlighting, autocomplete, %%pivotal cell magic, interactive object viewer and explorer, and GUI controls

AI support — ask an LLM or coding agent to generate, run, verify, and compare Pivotal code via the Pivotal MCP server

Comprehensive data pipelines — build full workflows with data-quality checks, pipeline functions, column loops, and loadable config / metadata values

Plotting and tables — create charts and publication-ready tables with simple syntax, backed by matplotlib and Great Tables

Data packages — export DataFrames, charts, and tables to a single Frictionless data package

Python integration — call Python functions, load Python variables, and mix Pivotal and Python code as needed


Installation

pip install pivotal-lang

This installs the full feature set — Pandas, Polars, DuckDB, Great Tables.

For a minimal Pandas-only install:

pip install --no-deps pivotal-lang
pip install lark pandas matplotlib

JupyterLab extension

pip install pivotal-lab

VS Code extension

Install from the VS Code Marketplace, or build locally from editors/vscode.


Documentation

Full documentation including the complete syntax reference, backend guide, and API reference:

nealbob.github.io/pivotal-py


Contributing

Contributions are welcome! Please open an issue or pull request on GitHub.

To install the developer test dependencies:

pip install .[test]

The JupyterLab Playwright smoke test is optional. To install its dependency:

pip install .[jupyter-test]
python -m playwright install chromium

License

MIT


Authors

Neal Hughes


Version History

  • v0.1.0 — Initial release

  • v0.2.0 — Breaking grammar changes and major new features

    • Breaking: df <name> renamed to with <name>; copy syntax changed from df <name> from <source> to with <source> as <name>
    • Breaking: load syntax flipped from load <name> "path" to load "path" as <name>
    • New from statement for database connections (SQLite, DuckDB, SQLAlchemy URIs)
    • Full VS Code extension: data viewer, Python↔VS Code bridge, snippets with tab-stops, hover documentation
    • Improved error messages: friendly syntax errors, semantic validator (unknown table/column detection), runtime error filter with expandable tracebacks
    • AG Grid viewer: polished UI, column auto-fit, cell text selection, column pin menu
    • VS Code viewer opens in a horizontal split; quick-open command (Ctrl+Shift+O) to search all loaded data, charts and tables
    • Full install by default — dropped pivotal[all] extras syntax
  • v0.3.0 — New language features and fixes

    • else clause in conditional assignments: col = expr where condition else default
    • else default branch in multi-case (where / where / else) assignments
    • Scalar min() and max() in column expressions, supported across all backends
    • Fixed syntax highlighting gaps in VS Code and JupyterLab extensions
    • Fixed Pygments lexer missing keywords (else, end, and others)

Contact & Support

For questions, issues, or feature requests please open an issue on GitHub or contact hughes.neal@gmail.com.

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

pivotal_lang-0.5.0.tar.gz (191.8 kB view details)

Uploaded Source

Built Distribution

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

pivotal_lang-0.5.0-py3-none-any.whl (138.0 kB view details)

Uploaded Python 3

File details

Details for the file pivotal_lang-0.5.0.tar.gz.

File metadata

  • Download URL: pivotal_lang-0.5.0.tar.gz
  • Upload date:
  • Size: 191.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for pivotal_lang-0.5.0.tar.gz
Algorithm Hash digest
SHA256 56779824239a14e638de60cfb9efe5c1ab8e39c465294cec6dca4497be4818cf
MD5 11027a447530d3214aa86ed853c4e23f
BLAKE2b-256 5d383be32f8e3272c9ef39f928ccf88caedbfbd7f1a26cffe43b3b38c1df4960

See more details on using hashes here.

File details

Details for the file pivotal_lang-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: pivotal_lang-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 138.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for pivotal_lang-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f66e2cea66f39e7fcc8e6fd8210763bb59056cbc977d82d8ec8555aaeebb312
MD5 e001159052cab407a842a445c6275958
BLAKE2b-256 474cf3881592c57c6fe685f2b99d6ac04cdd6ed0deb6c62ed18ef6682e932d11

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