No project description provided
Project description
CSV on the web
Links
GitHub: https://github.com/cldf/csvw
Issue Tracker: https://github.com/cldf/csvw/issues
Installation
This package runs under Python 2.7, and 3.4+, use pip to install:
$ pip install csvw
Example
>>> import csvw
>>> tg = csvw.TableGroup.from_file('tests/csv.txt-metadata.json')
>>> tg.check_referential_integrity()
>>> assert len(tg.tables) == 1
>>> assert tg.tables[0] is tg.tabledict['csv.txt']
>>> tg.tables[0].check_primary_key()
>>> from collections import OrderedDict
>>> row = next(tg.tables[0].iterdicts())
>>> assert row == OrderedDict([('ID', 'first'), ('_col.2', 'line')])
>>> assert len(list(tg.tables[0].iterdicts())) == 2
See also
License
This package is distributed under the Apache 2.0 license.
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
csvw-1.3.0.tar.gz
(20.1 kB
view hashes)
Built Distribution
csvw-1.3.0-py2.py3-none-any.whl
(25.2 kB
view hashes)