Skip to main content

csvblend: Python CSV Merge Library

GitHub Actions GitHub License PyPI - Version

Join or merge multiple CSVs.

csvblend is a Python library to merge multiple CSVs based on a list of columns efficiently.

NOTE: csvblend requires SQLite version 3.24.0 (2018-06-04) or better:

python -c 'import sqlite3; print(sqlite3.sqlite_version)'

Basic merge usage:

>>> from csvblend import MergeFiles
>>> columns = ["field1", "field2", "field3"]
>>> indexes = ["field1"]
>>> with MergeFiles(columns, indexes) as mf:
...     with open("csvfile1") as fp:
...         mf.merge(fp)
...     with open("csvfile2") as fp:
...         mf.merge(fp)
...     with open("csvfile3") as fp:
...         mf.merge(fp)
...     for row in mf.rows():
...         print(row)

Features | Installation | Usage | Contributing | License

Features

  • SQLite (RDBMS) under the hood.
  • Affected row count (created or updated) -- show changes between CSVs.
  • No external dependencies.

csvblend officially supports Python 3.8+.

Installation

To install csvblend, simply run:

$ pip install -U csvblend
✨🖇✨

Usage

For documentation, see ./docs/README.md.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License.

Metadata

Release files for csvblend 0.2.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 csvblend 0.2.0
File Size Uploaded
csvblend-0.2.0.tar.gz 5.5 kB Details

Built distribution (wheel)

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

Total release size: 12.2 kB

Release files / csvblend-0.2.0.tar.gz

Download URL csvblend-0.2.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6dac7b1ee0a2b18763c8c8131dcfe0da391f3117ac7859ee4bd60b5c2e3f8c83
BLAKE2b-256 checksum
How to use checksums
84de57cd40d8ab7474f9270abe9969e1dbfa1e0f5398f1de13ea6ccb6a1bc003
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.9 Linux/6.6.41-03520-gd3d77f15f842

Release files / csvblend-0.2.0-py3-none-any.whl

Download URL csvblend-0.2.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59419c059fc6d9343f29c32d3b6f09a23a08b15d7d325d40402bcd3e41e75c77
BLAKE2b-256 checksum
How to use checksums
d5cc321c58a2a4e72db88860fa55d0014c5bb3c1dd8bd2192b147d09f493150a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.9 Linux/6.6.41-03520-gd3d77f15f842

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

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