Skip to main content

Lightweight reconciliation tests for DataFrames

Project description



Lightweight reconciliation tests for DataFrames

CI Build PyPI version PyPI license Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.

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=True on 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


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.4.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

recx-0.0.4-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file recx-0.0.4.tar.gz.

File metadata

  • Download URL: recx-0.0.4.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for recx-0.0.4.tar.gz
Algorithm Hash digest
SHA256 ba70a754118818bac08b71d0afc890ace09c21481417fd53ebfc7618d1d18df7
MD5 649e46c4a445e30e318b181b73f62464
BLAKE2b-256 1b7326ed3dda7341d6f132cee8ebff0ab692913798ac1178b03bdb1ae996b1a3

See more details on using hashes here.

File details

Details for the file recx-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: recx-0.0.4-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

Hashes for recx-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ee2b7d4520dc6a20248b83ca2818157148c3fc20f83afebe953113df5deccaf9
MD5 7933ceedb619dbcb71ac7fb0aca23692
BLAKE2b-256 4aec8ce6d5d6de08df92236ad45809aad0c52aedc00b89ab96c9214a631dc7ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page