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.0

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.0
File Size Uploaded
datarecon-0.1.0.tar.gz 10.4 kB Details

Built distribution (wheel)

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

Total release size: 20.3 kB

Release files / datarecon-0.1.0.tar.gz

Download URL datarecon-0.1.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
548d97e77023416066d5db1d5553e69c816907f0f27bb021cf65a06d3b5e397b
BLAKE2b-256 checksum
How to use checksums
fa56c81a16be057e26ee8553ef55807ef0cdd387d50bf039bd62579cc085419f
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.0-py3-none-any.whl

Download URL datarecon-0.1.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce62b735fc1fb907bd21d94cf7b1cc72e8c664546557645e9e917f8bcdaae8e0
BLAKE2b-256 checksum
How to use checksums
55d8cfdd0e31ac219a4509f3d6c1b2cd74b824555f11cd0c59770cd711603574
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

0.1.1

2 release files

This release

0.1.0 This release

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