csvx: painless csv
Project description
A csv library that supports 2 and 3, does the unicode thing properly, and lets you read rows as ordered dictionaries so that the ordering stays correct by default.
Which makes things pretty easy.
Example. You’ve got a csv you want to sanitize by removing a column of passwords.
Here’s how that looks.
import csvx
with csvx.OrderedDictReader('unsanitized.csv') as csv_in:
rows = list(csv_in)
for r in rows:
del r['password']
with csvx.DictWriter('sanitized.csv') as csv_out:
csv_out.write_dicts(rows)
Documentation
Full documentation is at https://csvx.readthedocs.org.
Install
Simply install with pip:
$ pip install csvx
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
csvx-0.1.1459403998.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for csvx-0.1.1459403998-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80bb18e8a2ded31dd6ccb52b43b320e83137d9e85d155b83a13e8f237af34674 |
|
MD5 | 5513f6b9242bf0421ece3694dff08245 |
|
BLAKE2b-256 | 3156d71b5e83f33a19807a6a60e04ef40eae8a0abf4b0534accb56948fea6077 |