Skip to main content

Add your description here

Project description

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

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

drift_scope-0.0.2.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drift_scope-0.0.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file drift_scope-0.0.2.tar.gz.

File metadata

  • Download URL: drift_scope-0.0.2.tar.gz
  • Upload date:
  • Size: 39.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for drift_scope-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e6fc25b64200e7df95666fb2978a53a565a25027e21a2936db9945aab9173d0d
MD5 40c34ab7e891388871ee4f536e03e908
BLAKE2b-256 e906e871863d4a728bb89ac5c5ac325cec68aca2349551336653789d20fec57d

See more details on using hashes here.

File details

Details for the file drift_scope-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for drift_scope-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2dfa21e808fc9782e052621a0b99bb956f7dc10a1f3a092aab9548eaf5550a9e
MD5 0bc1e0579a9d481e74de59a25282fd70
BLAKE2b-256 eb58ca1cca7cb52f1dc24e103b3a541d75f6368fc0b2b39888642256d9fecf85

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