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.6.tar.gz (8.8 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.6-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for recx-0.0.6.tar.gz
Algorithm Hash digest
SHA256 b0e147d220b4c0c1f72ac8dcaec9818391d13b84386ecc4a36a1240e3999c689
MD5 7e6c5271803cd352b6b4663de056bf36
BLAKE2b-256 dc3975b97a53801a1710f12e1337fede6358d0ce9181801e78c37093cc914ed5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for recx-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 634d5f553bebd9f6463196c4ef5cec3d4223f066a52c34e0251d9a89bb32569c
MD5 77ddb617ab42bdcc3cfa15ac4f7210b9
BLAKE2b-256 ef12f3df1914f63a2ec3141f02685fd34599a61fd657d31130421f35cadeea03

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