Cool way to deal with 'headed' CSV
Project description
Cool way to deal with ‘headed’ CSV
- Rules of the parser
1 - First row is a list of column names. 2 - All rows have the same numbers of columns. 3 - Empty column names are ignored. 4 - Columns without name are ignored.
Example:
name0
name1
name3
v0
v2
v3
v4
Equivalent:
name0
name1
name3
v0
v2
Use:
>>> import csvcool
>>> cool = csvcool.read(open("path/to/csv"))
>>> cool[0]["name0"]
v0
>>> cool[0]["name0"] = 1
>>> cool[0]["name0"]
1
>>> csvcool.write(cool, open("path/to/csv", "w"))
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
csvcool-0.3.5.tar.gz
(9.6 kB
view details)
File details
Details for the file csvcool-0.3.5.tar.gz.
File metadata
- Download URL: csvcool-0.3.5.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffd5b3adb234fe56f3bdd3b0c58b01c262bf5ee9a8f9da6839cdb905965986ae
|
|
| MD5 |
f9cc4f57ca41f029d4f0399ba5ec3ccb
|
|
| BLAKE2b-256 |
601fb84a5dfc88a4f8ed9e12a0f16d691751b0d74b19e9362dff7c73353b5b4e
|