Skip to main content

Lightweight reconciliation tests for DataFrames

Project description



Lightweight reconciliation tests for DataFrames

CI Build PyPI version PyPI license Project Status: Active

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.8.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.8-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for recx-0.0.8.tar.gz
Algorithm Hash digest
SHA256 d44c0fc5d8edc017172cc822d62e150404b8dac1d7ca28858a605d6df7fadd29
MD5 e0d9f3b32c9e3ec2e21baa3ac36be60b
BLAKE2b-256 8c6c5515ffeb0c7430a8f95a3919f07237c7052f16b030a660ea638d41309133

See more details on using hashes here.

File details

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

File metadata

  • Download URL: recx-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.3

File hashes

Hashes for recx-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7f8a492c3ae776922a4ba8363e7fa9b4ca4a842dea49b41328fd05748be9629f
MD5 474148012291600f41dbfb948c86cf9e
BLAKE2b-256 657c5a5be0dc9d5f2e3fec49674d57e1902cc196572b3040a1d9c6dedcd2ba1d

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