Skip to content

nealbob/pivotal-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

507 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.5.0

  • New language features including bulk load, column for loops, regex string operations, regex-based column selection, assert / check, native list / scalar / dict values, pipeline functions, and richer output commands
  • Expanded AI and automation support with structured run / verify / compare APIs, a local MCP server, a hosted read-only MCP mode, docs search tools, and syntax highlighting metadata
  • Major documentation expansion including the full syntax reference, command reference, backend guide, and MCP server docs
  • Improved editor and notebook experience across JupyterLab and VS Code, including better highlighting, autocomplete, viewer behavior, and packaging fixes

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

Contact & Support

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors