csvcool-0.3.5
توضیحات
Cool way to deal with 'headed' CSV
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | csvcool-0.3.5 |
| نام | csvcool |
| نسخه کتابخانه | 0.3.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | JBC |
| ایمیل نویسنده | jbc dot develop at gmail dot com |
| آدرس صفحه اصلی | http://bitbucket.org/leliel12/csvcool |
| آدرس اینترنتی | https://pypi.org/project/csvcool/ |
| مجوز | GPL3 |
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"))
نحوه نصب
نصب پکیج whl csvcool-0.3.5:
pip install csvcool-0.3.5.whl
نصب پکیج tar.gz csvcool-0.3.5:
pip install csvcool-0.3.5.tar.gz