Skip to main content

Join or merge multiple CSVs.

Project description

csvblend: Python CSV Merge Library

Travis (.org) Codecov GitHub PyPI Code Style: black

Join or merge multiple CSVs.

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

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 = ["a", "b", "c"]
>>> indexes = ["a"]
>>> with MergeFiles(columns, indexes) as mf:
...     mf.merge(open(csvfile1))
...     mf.merge(open(csvfile2))
...     mf.merge(open(csvfile3))
...     for row in mf.rows():
...         print(row)

Features | Installation | Usage | Contributing | License

Features

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

csvblend officially supports Python 3.6+.

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.1.0.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

csvblend-0.1.0-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

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