⚠️ WIP: All 0.1.x releases are experimental. 0.2.0 will be the first stable, production-ready release.
Releases >0.1.5 are ready for testing, but the API is still subject to change.
frameworthy
Frameworthy is a lightweight, dataframe-first library for statistically validating changes in data and metrics. Built for engineers and scientists who need reliable checks with statistical rigor, but are not looking to adopt a heavy platform. 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_df)
.mean("column_name")
.equivalent(within=0.1)
)
# inspect the results
print(result)
# or raise an exception on failure
result.assert_passed()
No data of your own yet? check() also accepts two numpy arrays directly, and frameworthy ships a couple of sample-data generators so you can try it with no extra steps:
import frameworthy as fw
data = fw.sample_normal(shift=0.0)
result = fw.check(data.after, data.before).mean().equivalent(within=0.2)
print(result)
Usage
Bring your data: two Pandas/Polars dataframes (before and after / pre and post). Also supports passing in numpy arrays directly.
A standard frameworthy check looks like this:
fw.check(after_df, before_df).mean("column_name").equivalent(within=0.1)
- Start a check with
fw.check(after_df, before_df) - Specify the metric to check, with
.mean("column_name") - Make a claim about the change, using
.equivalent(),.change_greater_than(), or.change_less_than() - 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% CIalpha=0.025→ 95% CI
.change_greater_than()and.change_less_than()alpha=0.1→ 90% CIalpha=0.05→ 95% CI
Distribution Checks
.distribution().equivalent() doesn't use the BCa bootstrap that powers .median()/.custom(). The plug-in Wasserstein distance estimator is biased and, right where it matters most (two samples that are actually equivalent, so the true distance is 0 or close to it), the ordinary bootstrap is known to be unreliable at that boundary. Instead, it uses a subsampling/m-out-of-n bootstrap, which stays valid in that case.
Like .mean()/.rate()/.median()/.custom(), .distribution() supports both independent and paired samples (paired_by= across two dataframes, or paired_column= within a single dataframe). Pairing doesn't change the observed Wasserstein distance itself (it's a function of the two marginal distributions), but it does narrow the confidence interval when before/after are correlated, since the subsampling bootstrap then resamples matched pairs together instead of independently.
Development
To run the tests:
make test
To run the examples:
uv run scripts/examples.py
Feedback/Questions
Questions or feedback are welcome! Please open an issue.
License
MIT, but attribution is appreciated.
Metadata
Release files for frameworthy 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| frameworthy-0.1.6.tar.gz | 27.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| frameworthy-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 61.9 kB
Release files / frameworthy-0.1.6.tar.gz
| Download URL | frameworthy-0.1.6.tar.gz |
|---|---|
| Size | 27.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
985cfdd1b46b72d33a80c93017c1265801309ea28cd0abf5436ff5e66eaf44a4
|
|
BLAKE2b-256 checksum How to use checksums |
18586af8fd30d0266d50dc3dbe04d280fadf88921282abea89e1952f5f09c5b9
|
| 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 Sep 21, 2026.
Transparency logRelease files / frameworthy-0.1.6-py3-none-any.whl
| Download URL | frameworthy-0.1.6-py3-none-any.whl |
|---|---|
| Size | 34.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b525e9007c2530085342a934e86faa4b6f32c246be169460c5e9023ac8bcf3a
|
|
BLAKE2b-256 checksum How to use checksums |
dce5ea41430908daf4cafdc02f796ed56e770bf02c1101503e883f37db9bab68
|
| 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 Sep 21, 2026.
Transparency log