Tool to compare tables
Project description
Table Diff
Table Diff is a Python package that provides a text-based interface for comparing two tables. It is designed to be used by data analysts and data scientists to compare two tables and identify differences between them, especially as transformation rules are adjusted in an ETL pipeline.
The diff between two tables is printed to stdout as Markdown, and can be saved to a Markdown, HTML, or DuckDB file.
Features
- Generate a diff report between two tables.
- View the diff quickly in Markdown.
- Supports the following input formats:
- CSV
- Parquet
- Supports the following output formats:
- HTML (summary)
- DuckDB (comprehensive)
- Markdown (summary)
- PDF (summary - experimental)
- View common enum/value transitions.
Getting Started
-
Install Python 3.10 or later, and the
uvPython package manager. -
Install this package using
uv tool:
uv tool install table-diff
# Optionally, install with PDF support (experimental):
uv tool install table-diff --with pymupdf
- Run the either of the following to compare two tables:
table_diff <old_csv_path> <new_csv_path> -u PrimaryKeyCol1 PrimaryKeyColN
For development environment setup, please refer to the CONTRIBUTING.md guide.
Contributing
Please submit Bug Reports and Merge Requests to the GitLab project.
Please refer to the CONTRIBUTING.md file for more details about the contribution policy.
License
This project is licensed using the MIT License. For more information, see the LICENSE file.
Note that this project has been created and modified with the help of Large Language Model (LLM)-based tools like GitHub Copilot and ChatGPT.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file table_diff-0.2.3.tar.gz.
File metadata
- Download URL: table_diff-0.2.3.tar.gz
- Upload date:
- Size: 115.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72364c142465a95cba368d75e49361b5596fba61dd529c435641a3f8f9946e15
|
|
| MD5 |
886be6fc52c0edcb9eb7adaea497a996
|
|
| BLAKE2b-256 |
bf24deb5652be447d8453114d13c87ae5f86cb4b70f05fe00beec5956f5d83f6
|
File details
Details for the file table_diff-0.2.3-py3-none-any.whl.
File metadata
- Download URL: table_diff-0.2.3-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7491f86bcb7fa9c68b82359e5d871198b28081ec70665e3eb53c84de749261b8
|
|
| MD5 |
b78fb5d1adcd15fde3b84a813b2a042c
|
|
| BLAKE2b-256 |
c5b5b1c983daf1c9fe2484bb36a19d23fbed7e4954101d0a67cad7fea792a7ac
|