Skip to main content

⚠️ WIP: All 0.1.x releases are unstable. 0.2.0 will be the first stable, production-ready release.

Releases >0.1.3 are functional and ready for testing, but the API is still subject to change.

frameworthy

PyPI Version PyPI pyversions codecov

Lightweight statistical validation library for data changes. Built for engineers and scientists who need to validate data changes with statistical rigor. Works in data validation pipelines, in tests with assertions, or in exploratory settings with easily inspectable results.

Getting Started

Installation

Available on PyPI, use pip or your preferred package manager.

pip install frameworthy
# or
uv add frameworthy

Examples

See scripts/examples.py for a few quick examples.

import frameworthy as fw
import polars as pl # or pandas

# load your data if necessary
before_df = pl.read_csv("before.csv")
after_df = pl.read_csv("after.csv")

# run a check
result = (
    fw.check(after_df, before=before_df)
    .mean("column_name")
    .equivalent(within=0.1)
)

# inspect the results
print(result)
# or raise an exception on failure
result.assert_passed()

Usage

Bring your data: two pandas/polars DataFrames (before and after / pre and post).

A standard frameworthy check looks like this:

fw.check(after_df, before_df).mean("column_name").equivalent(within=0.1)
  1. Start a check with fw.check(after_df, before_df)
  2. Specify the metric to check, with .mean("column_name")
  3. Make a claim about the change, using .equivalent(), .change_greater_than(), or .change_less_than()
  4. Examine the results or assert that the check passed with .assert_passed() for testing

Methodology

These are the most important notes to be aware of for correct usage. For further details, see the more extensive docs.

Confidence Intervals

The parameter alpha is a one-sided significance level everywhere; .equivalent()'s displayed CI is (1-2α), not (1-α). This is to maintain consistency with the TOST (Two One-Sided Tests) equivalence testing method.

Examples:

  • .equivalent()
    • alpha=0.05 → 90% CI
    • alpha=0.025 → 95% CI
  • .change_greater_than() and .change_less_than()
    • alpha=0.1 → 90% CI
    • alpha=0.05 → 95% CI

Development

To run the tests:

make test

To run the examples:

uv run scripts/examples.py

License

MIT, but attribution is appreciated.

Metadata

Release files for frameworthy 0.1.3

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

Source distribution (sdist)

Source distribution for frameworthy 0.1.3
File Size Uploaded
frameworthy-0.1.3.tar.gz 19.5 kB Details

Built distribution (wheel)

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

Total release size: 44.6 kB

Release files / frameworthy-0.1.3.tar.gz

Download URL frameworthy-0.1.3.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fe8682c9f30535cda2b9f7e73ef73f2ec7f2895f2858960a68fe997cfa2813cc
BLAKE2b-256 checksum
How to use checksums
ed1cab765fbb9a8b9fa7f1fadaffb3bac0c0b59f13b42f865cbd1fdb8f628587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / frameworthy-0.1.3-py3-none-any.whl

Download URL frameworthy-0.1.3-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06fa8a018ac546d772500a0d2fc88d4fa7f494709285c82d420a0add76b288e2
BLAKE2b-256 checksum
How to use checksums
e24d6589cb1a06e6cccf1f07773652cc906cc0d6607dca13f8308945dd7e107a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.1.6

2 release files

0.1.5

2 release files

This release

0.1.3 This release

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