ddrift analyzes the differences between data sources, i.e. how much has dataset a drifted from dataset b. The framework is engine agnostic. Each engine is required to comply with simple abstract protocols in order to enable the standard reporting.
Engines Supported:
- DuckDB
Engines to be Supported:
- Postgres
- Polars
- Pandas
Install with pip install ddrift or (prefferebly) uv pip install ddrift
Getting Started
Let's create 2 simple tables and compare them to one another. The fundamental question we're asking is "How much has table2 drifted from table1?"
import duckdb
with duckdb.connect() as con:
con.execute("CREATE TABLE table1 (city VARCHAR, state VARCHAR)")
con.execute(
"INSERT INTO table1 VALUES ('New York', 'NY'), ('Los Angeles', 'CA'), ('Chicago', 'IL')"
)
con.execute("CREATE TABLE table2 (city VARCHAR, state VARCHAR)")
con.execute(
"INSERT INTO table2 VALUES ('New York', 'NY'), ('Phoenix', 'AZ'), ('Philadelphia', 'PA')"
)
sql = SQLComparator(df1="table1", df2="table2", con=con)
sql.comp_freq(vars=("city", "state"))
print(sql.results) # prints a list of result objects containing an in memory representation
Metadata
Release files for ddrift 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ddrift-0.1.0.tar.gz | 24.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ddrift-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.4 kB
Release files / ddrift-0.1.0.tar.gz
| Download URL | ddrift-0.1.0.tar.gz |
|---|---|
| Size | 24.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5363c7df2dd9a38fe1884d09971ee740477d3ec0f703e6d8dd63094e48ec0671
|
|
BLAKE2b-256 checksum How to use checksums |
06e774e630c0cd0df2867d35782dda728439954f156cc93f37bb0ee01a63b309
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.2
|
Release files / ddrift-0.1.0-py3-none-any.whl
| Download URL | ddrift-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02705b39f332cc8e0da4672c0c99dc461f295dcb8b4d0e4535250a0bff299566
|
|
BLAKE2b-256 checksum How to use checksums |
7d3ffe93b656c197c0c4632114e732cc40b7686f870a685292da03432f5f683c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.2
|
Security for ddrift 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.