Skip to main content

datarecon

Compare two datasets and get an explanation of why they differ, not just a list of mismatched cells.

from datarecon import reconcile

result = reconcile(
    "source.csv", "warehouse_export.csv",
    key="student_id",
    rules={"score": {"tolerance": 0.01}},
    treat_as_equal={"case", "whitespace"},
)
print(result.summary())
result.to_excel("reconciliation.xlsx")
datarecon compare source.csv target.csv --key student_id -o report.xlsx --fail-on-diff

What it detects

Cause Example
leading_zeros 00123 vs 123
null_vs_blank None vs "" vs NULL
whitespace / case Mary Jones vs MARY JONES
numeric_format 0.0 vs 00, 10 vs 10.00
numeric_tolerance 10.004 vs 10.00 with tolerance=0.01
date_format 2026-09-01 vs 09/01/2026 (month-first)
similar_text Ann Lee vs Anne Lee (opt-in via fuzzy_threshold)
value_mismatch everything else

Also reported: rows missing on either side, duplicate keys, null keys, columns present on only one side.

Key values are matched after trimming, case folding and stripping leading zeros. Files are read as strings so no information is lost before comparison.

Development

pip install -e ".[dev]"
pytest

Metadata

Release files for datarecon 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datarecon 0.1.1
File Size Uploaded
datarecon-0.1.1.tar.gz 10.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for datarecon 0.1.1
File Interpreter ABI Platform
datarecon-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / datarecon-0.1.1.tar.gz

Download URL datarecon-0.1.1.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8a8b9a09a1a5cae4151b0a1adf1a121e621a72e3bd97b03ccfe66ed4589f6fa8
BLAKE2b-256 checksum
How to use checksums
ac0a629714a7ef905cb7365f9925081b05a5e3fd68577dd29f5efd8d7eecfe94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release files / datarecon-0.1.1-py3-none-any.whl

Download URL datarecon-0.1.1-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d60c4b18a6f04b27bc005477bd5222d37f8d8166fa5e136a5460f635ca3eac5
BLAKE2b-256 checksum
How to use checksums
2206f464981d0942ded8633722d2e8b929be36c50fa294f1ade9153c3b34117b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page