Skip to main content

Join or merge multiple CSVs.

Project description

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.

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

csvblend-0.2.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

csvblend-0.2.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file csvblend-0.2.0.tar.gz.

File metadata

  • Download URL: csvblend-0.2.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.6.41-03520-gd3d77f15f842

File hashes

Hashes for csvblend-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6dac7b1ee0a2b18763c8c8131dcfe0da391f3117ac7859ee4bd60b5c2e3f8c83
MD5 e4562199699ae7c68bad58ffb0646f2a
BLAKE2b-256 84de57cd40d8ab7474f9270abe9969e1dbfa1e0f5398f1de13ea6ccb6a1bc003

See more details on using hashes here.

File details

Details for the file csvblend-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: csvblend-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.6.41-03520-gd3d77f15f842

File hashes

Hashes for csvblend-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59419c059fc6d9343f29c32d3b6f09a23a08b15d7d325d40402bcd3e41e75c77
MD5 ff8a92005c53c5b1b8f1b7439aa41f3b
BLAKE2b-256 d5cc321c58a2a4e72db88860fa55d0014c5bb3c1dd8bd2192b147d09f493150a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page