Skip to main content

god — a grammar of data, for Python

One small vocabulary for manipulating tables, spelled the same way in Python, in R, and as plain text. A pipeline is checked whole before any of it runs, so a bad column is reported at the step that names it rather than failing partway through — or worse, not failing.

import pandas as pd
from god import *

sales = pd.read_csv("sales.csv")

sales >> keep(col.region == "West") \
      >> summarize(margin = total(col.margin), by = col.product)

The same sentence runs as plain text, byte-for-byte what you would paste into R or into a database:

run("""
sales
  then keep where [region] is "West"
  then summarize [margin] as total([margin]) by [product]
""")

And when you reach the edge of the vocabulary, it shows you the same pipeline in a tool you already know — show_as(pipeline, "pandas"), or "polars", "pyspark", "dplyr", "sql", "spark".

Installing

pip install grammar-of-data

Then import god. The wheel carries its own engine, so there is nothing else to install.

The manual, live in both languages, is at https://psychometrician.github.io/god-book/.

Release files for grammar-of-data 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for grammar-of-data 0.2.0
File
grammar_of_data-0.2.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
grammar_of_data-0.2.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
grammar_of_data-0.2.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
grammar_of_data-0.2.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
grammar_of_data-0.2.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 2.6 MB

Release files / grammar_of_data-0.2.0-py3-none-win_amd64.whl

Download URL grammar_of_data-0.2.0-py3-none-win_amd64.whl
Size 450.7 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
6b2f2eb7ff552a4feb5beae5893bb7fedffda09123d7aaf66ca355da2d0b4919
BLAKE2b-256 checksum
How to use checksums
d4776c0dfae39d7c4623b20ff056306a1a3b5126b78ef7e2a0af2467bce7db7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / grammar_of_data-0.2.0-py3-none-manylinux_2_28_x86_64.whl

Download URL grammar_of_data-0.2.0-py3-none-manylinux_2_28_x86_64.whl
Size 575.5 kB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
e23d80fe651b4ab4d00b5fb6931f108c39b4abf2e56ca3f1644d6312335e14db
BLAKE2b-256 checksum
How to use checksums
9eb80b7c9bad6a04e81cebbb0f5719c16e9da559ffd0f4ab677565a44858805a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / grammar_of_data-0.2.0-py3-none-manylinux_2_28_aarch64.whl

Download URL grammar_of_data-0.2.0-py3-none-manylinux_2_28_aarch64.whl
Size 545.8 kB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
c282c4190fb3046fab938bd51dc403d93c8c1c52d9d537d5c06085636da614d3
BLAKE2b-256 checksum
How to use checksums
17ce64aead092f1556b34a4960d5d5f3868a39e795c234ecfe9c29ba4dad2156
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / grammar_of_data-0.2.0-py3-none-macosx_11_0_arm64.whl

Download URL grammar_of_data-0.2.0-py3-none-macosx_11_0_arm64.whl
Size 521.1 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
305dfdcfd9a44d6b4460e19a6822ce641eedbbb0f98326e21f1ea14da2b52cc3
BLAKE2b-256 checksum
How to use checksums
6a1b5905fd8b87b0c58e51953a44bda85e5724f5bd55e6a94a3fdb08e0ae0655
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / grammar_of_data-0.2.0-py3-none-macosx_10_12_x86_64.whl

Download URL grammar_of_data-0.2.0-py3-none-macosx_10_12_x86_64.whl
Size 556.3 kB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d2c0da604f68826a0c73bed198fc0d69acebb84a53c430dda63dab55b8c7a334
BLAKE2b-256 checksum
How to use checksums
0a2452b08bfac599abb89f673f70b6d1b87ee54aa90489a394a1c38b04be9c64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.2

5 release files

0.2.1

5 release files

This release

0.2.0 This release

5 release files

0.1.0

5 release 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