Skip to main content

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.

Website: www.pivotal-lang.org


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

JupyterLab demo

What's New In 0.6.0

  • Native backend-independent expression and condition IR, with supported assignments and filters generated consistently across pandas, Polars, DuckDB, and SQL
  • Explicit package and table persistence with save package as, file saves, and managed-table saves
  • Explicit \ line continuation for long statements
  • JupyterLab autocomplete arrow-key navigation and corrected faceted-plot title handling

See the full changelog at: https://github.com/nealbob/pivotal-py/blob/master/CHANGELOG.md

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:

docs.pivotal-lang.org


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)
  • v0.5.0 - Major syntax, MCP, docs, and editor release

    • Added bulk load, column for loops, regex transforms, regex selection, data-quality commands, native values, and pipeline functions
    • Added structured AI verification / comparison APIs and both local and hosted MCP server modes
    • Added complete syntax and command-reference docs, plus versioned online docs
    • Improved JupyterLab and VS Code highlighting, autocomplete, viewer rendering, and packaging
    • See CHANGELOG.md on GitHub for the full release notes
  • v0.6.0 - Native expressions, persistence syntax, and notebook fixes

    • Added backend-independent expression and condition IR with compatibility fallbacks
    • Added explicit package, file, and managed-table save syntax
    • Added explicit line continuation
    • Fixed JupyterLab autocomplete navigation and faceted plot titles
    • See CHANGELOG.md on GitHub for the full release notes

Contact & Support

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

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.6.0.tar.gz (213.1 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.6.0-py3-none-any.whl (153.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pivotal_lang-0.6.0.tar.gz
  • Upload date:
  • Size: 213.1 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.6.0.tar.gz
Algorithm Hash digest
SHA256 bde09cde2755d2e6a6b7fa252a3c462862cb11c1c9de57967b13202d93101609
MD5 6b17bf465946c4d1b0c4616fe935ff7c
BLAKE2b-256 946ad51f044088153a3af4d8aadfb5c5e15b6e4a1031e217430ea78549f94011

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pivotal_lang-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 153.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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc26b8802b83f316b48c1c013eec0759001f6a53051894880f2d565e3d19b91c
MD5 8c095ed751220153e6939c53ab210a1f
BLAKE2b-256 88948ff65ab7fb88f9238968a4be43952059b6719c562891cacb56b74a3bb424

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7.0

2 files

This release

0.6.0 This release

2 files

0.5.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page