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.1459310240.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file csvx-0.1.1459310240.tar.gz
.
File metadata
- Download URL: csvx-0.1.1459310240.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b511a280fdd74c64cddd0dbeee814f0de744c67234718e717c4df53bac96f9a |
|
MD5 | f4a2fdd51a34be7d75d6096965f8a1dc |
|
BLAKE2b-256 | e38cd8a0000476f62c3e38d2197689633fd63784292e2cc99a0143a5191c5685 |
File details
Details for the file csvx-0.1.1459310240-py2.py3-none-any.whl
.
File metadata
- Download URL: csvx-0.1.1459310240-py2.py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b7d1c35c21ee395e7177fe382e0601ca9d6ecaa758f8ac80f0f23683c87faf3 |
|
MD5 | e510891d9e44398aebd44aab1925f0d0 |
|
BLAKE2b-256 | 0b41ce939c3f47c6b2c98778effc4365106c860acc8b441ba593c53396a9db35 |