Lightweight reconciliation tests for DataFrames
Project description
Lightweight reconciliation tests for DataFrames
Use Rec to compare two DataFrames (baseline vs candidate) with per-column checks (equality, absolute / relative tolerance, regex-driven selection) and clear summaries of failures.
Features
- Declarative column mapping
- Built-in checks: equality, absolute tolerance, relative tolerance
- Index integrity checks (missing / extra index values)
- Regex column selection (
regex=Trueon checks) - Compact textual summary
- Extensible: implement custom checks by subclassing
ColumnCheck
Install
With pip:
pip install recx
with uv:
uv add recx
Quick Example
import pandas as pd
from recx import Rec, EqualCheck, AbsTolCheck
baseline = pd.DataFrame({
"price": [100.00, 200.00, 300.00],
"status": ["active", "inactive", "active"]
})
candidate = pd.DataFrame({
"price": [100.00, 200.00, 301.00],
"status": ["active", "inactive", "active"]
})
rec = Rec(columns={
"price": AbsTolCheck(tol=0.01),
"status": EqualCheck(),
})
result = rec.run(baseline, candidate)
result.summary()
Feel free to open issues or PRs with suggestions or improvements.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
recx-0.0.5.tar.gz
(8.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
recx-0.0.5-py3-none-any.whl
(9.3 kB
view details)
File details
Details for the file recx-0.0.5.tar.gz.
File metadata
- Download URL: recx-0.0.5.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebd327825f0f65e823876ab90862b4e8d2c129f7cfe32324909ba7761c83e915
|
|
| MD5 |
8ea603a283fff53df8a323f0b2b1af6b
|
|
| BLAKE2b-256 |
cf3121670bb83be7cc36fdd50c6a729eb0e47a93d582c4410515f460a6130698
|
File details
Details for the file recx-0.0.5-py3-none-any.whl.
File metadata
- Download URL: recx-0.0.5-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a19480579949c7159fa8ef617f4003e587244010271466525a310ef14400f5d
|
|
| MD5 |
9c24bf2d1718e166d768aed7129b6900
|
|
| BLAKE2b-256 |
789e0cb195c89a240331ae2c9790c58bb4e56f2dc8a77e2a3878571bf3e604ba
|