Skip to main content

DataComPy

PyPI - Python Version Ruff PyPI version Anaconda-Server Badge PyPI - Downloads

DataComPy is a package to compare two DataFrames (or tables) such as Pandas, Spark, Polars, and even Snowflake. Originally it was created to be something of a replacement for SAS's PROC COMPARE for Pandas DataFrames with some more functionality than just Pandas.DataFrame.equals(Pandas.DataFrame) (in that it prints out some stats, and lets you tweak how accurate matches have to be). Supported types include:

  • Pandas
  • Polars
  • Spark
  • Snowflake

[!IMPORTANT] datacompy has released v1. The v0.19.x line is no longer supported — users should upgrade to v1 going forward. The support/0.19.x branch is archived and will only receive critical security fixes on a best-effort basis; no new features or regular maintenance will be provided. All active development targets main.

Quick Installation

pip install datacompy

or

conda install datacompy

Installing extras

If you would like to use Spark or any other backends please make sure you install via extras:

pip install datacompy[spark]
pip install datacompy[snowflake]

Supported backends

Programmatic Report Access

Every compare object exposes build_report_data() which returns a typed ReportData object — useful for dashboards, JSON export, or custom rendering without relying on the string report:

import pandas as pd
from datacompy import PandasCompare

df1 = pd.DataFrame({"id": [1, 2, 3], "val": [10, 20, 30]})
df2 = pd.DataFrame({"id": [1, 2, 3], "val": [10, 99, 30]})

compare = PandasCompare(df1, df2, join_columns="id")

# Access structured data directly
data = compare.build_report_data()
print(data.row_summary.unequal_rows)  # 1
print(data.mismatch_stats.stats[0].column)  # 'val'

# Render / export — methods live on ReportData itself
print(data.render())  # same text as compare.report()
data.save("report.html")  # HTML file
data.to_dict()  # JSON-serializable dict

See the Report API documentation for the full reference.

Contributors

We welcome and appreciate your contributions! Before we can accept any contributions, we ask that you please be sure to sign the Contributor License Agreement (CLA).

This project adheres to the Open Source Code of Conduct. By participating, you are expected to honor this code.

Release files for datacompy 1.0.4

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

Source distribution (sdist)

Source distribution for datacompy 1.0.4
File Size Uploaded
datacompy-1.0.4.tar.gz 121.3 kB Details

Built distribution (wheel)

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

Total release size: 195.4 kB

Release files / datacompy-1.0.4.tar.gz

Download URL datacompy-1.0.4.tar.gz
Size 121.3 kB
Tags Source
SHA-256 checksum
How to use checksums
baf7f429f6bf45f1b5b704db7f06074115cb8baa60488eb08377271d25e60ba0
BLAKE2b-256 checksum
How to use checksums
2da259fce1ab49bb8cf2d7720d4cc99086b722e77aa463efbfed4a04178c0ad9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / datacompy-1.0.4-py3-none-any.whl

Download URL datacompy-1.0.4-py3-none-any.whl
Size 74.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56e28bb0e5e3f88e82b1f3e4ba6b6e729aa0f851320b78a06bf2020e41e0e60f
BLAKE2b-256 checksum
How to use checksums
b82fab01cb21abbc5341b1bb45f379cc10e0bf666a81bceb620bf12e7d812dba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.19.4

2 release files

0.19.3

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.1

2 release files

0.16.8

2 release files

0.16.7

2 release files

0.16.6

2 release files

0.16.5

2 release files

0.16.4

2 release files

0.16.3

2 release files

0.16.2

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.3

2 release files

0.14.2

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.3

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.1

2 release files

0.11.3

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.5

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.9.0

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

1 release file

0.5.0

1 release file

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