Skip to main content

notebookproof

Notebook preflight and DataFrame health checks that run inside your notebook. Findings explain the evidence and suggest a next step. No scores or guarantees of reproducibility. The install name and import name are both notebookproof.

Install

In a notebook cell:

%pip install notebookproof

Python 3.9 or newer is required. The base package has no required dependencies; use the pandas or Polars DataFrame you already have in your notebook.

Notebook preflight

Save your notebook, then run:

import notebookproof

report = notebookproof.check("your-notebook.ipynb")

check() without a path attempts to discover the current document in Jupyter or Colab. Discovery varies by host; an explicit path is the reliable option for saved files, including VS Code. Relative paths use the kernel's working directory. Colab can provide a live document, but its kernel state is not checked.

Preflight reports likely missing or forward references, syntax errors, saved execution errors, missing or out-of-order execution counts, possible stale outputs, star imports, notebook commands, and some random calls with no visible earlier seed. Cell numbers include Markdown cells, matching the document order. The report also lists cell reads and writes, with deferred function references kept separate from immediate reads.

This is static analysis. It does not run your cells, validate every control-flow path, track mutations, or inspect live kernel state. Function call timing, conditional definitions, dynamic imports, aliases, magics, and external inputs can require manual review. A saved execution count does not prove an output is current, and a missing count does not prove a cell never ran.

DataFrame health

report = notebookproof.frame(df)

# Only declare a key when these columns should jointly identify one row.
report = notebookproof.frame(df, keys=["account_id", "period"])

# Optional: explicitly inspect the first N rows instead of the whole table.
report = notebookproof.frame(df, max_rows=8000)

frame() checks all rows by default. It keeps the real values and null masks, does not round-trip through CSV, and does not change the DataFrame. Literal strings like "NA", "-", and "?" are not nulls. Integer 1 and string "1" remain different values. Nullable dtypes and rows containing only nulls are preserved. Only an eager pandas or Polars DataFrame is accepted.

Findings include missing values, mixed value types, repeated rows, declared-key duplicates or missing key values, constant columns, numeric outliers, infinite values, identical columns, and strong numerical correlations. A correlation is an observation, not proof of a copied column or a mistake. Repeated observations and nulls may be legitimate; the tool does not remove or convert anything.

Sampling is opt-in and prominently disclosed. Pairwise column checks can be expensive for very wide tables. Nested lists and dictionaries are supported; unsupported unhashable object columns get an explicit skipped-check finding.

Optional fresh-kernel execution

Install the execution extra:

%pip install "notebookproof[verify]"

Then, from a notebook cell:

result = notebookproof.verify("your-notebook.ipynb", timeout=60)

This uses Jupyter's NBClient to run saved code in a separate, fresh kernel. It reports success or the first failure and cell number, including timeouts. The timeout is per cell. The original notebook file is not written, and your current notebook kernel is not restarted. The saved kernelspec is used by default; pass kernel_name="python3" to choose another installed kernel.

Execution uses your normal permissions. Notebook code can write files, contact services, or perform other side effects; only run notebooks you intend to execute. A fresh kernel is not a sandbox. Nested verify() calls are skipped to prevent recursive kernel creation. Successful execution does not establish that old and new outputs match; output equivalence is not compared.

Try it and give feedback

Open the five-minute trial notebook in the notebook environment you already use. The trial questions cover whether the first useful finding arrives quickly and whether you would use the checker again. Adoption has not yet been measured.

Development and publishing

python -m pip install -e ".[test]" build twine
python -m pytest -q
python -m build
python -m twine check dist/*

GitHub Actions checks Windows and Linux on Python 3.9 and 3.14. Publishing setup describes the PyPI trusted publisher; no long-lived PyPI upload token is required.

Version 0.2 removes the old score and verdict fields. Use individual findings, their severity, and the disclosed inspection limits. The legacy CSV helpers remain available but preserve strings rather than guessing data types or nulls.

Metadata

Release files for notebookproof 0.2.1

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

Source distribution (sdist)

Source distribution for notebookproof 0.2.1
File Size Uploaded
notebookproof-0.2.1.tar.gz 21.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for notebookproof 0.2.1
File Interpreter ABI Platform
notebookproof-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 36.2 kB

Release files / notebookproof-0.2.1.tar.gz

Download URL notebookproof-0.2.1.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2bbf1adc23a0f1532478e958d52d6a3345dae7b2fe0de04611de9c0828488e66
BLAKE2b-256 checksum
How to use checksums
1c6848c33d68017168157bde21320e8b76fcdc3b93d962f92a4f2e974ea53c16
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 Oct 10, 2026.

Transparency log

Release files / notebookproof-0.2.1-py3-none-any.whl

Download URL notebookproof-0.2.1-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b37608b2e9c29f0989deabfcee893b246bac875a529b9b6002b6871465e534e
BLAKE2b-256 checksum
How to use checksums
c50a5bdaf0bb0288174f3dbd0b066e7f5b64014ff03ddfe50d7a72d86ef69d34
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 Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.1 This release

2 release files

0.2.0

2 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