read datafiles via the import system
Project description
data-import
import
data files via import-hook trickery
Installation
$ pip install dataimport
Usage
>>> import dataimport.test.csv as csv_file
>>> print(list(csv_file))
[['col1', 'col2', 'col3', 'col4'], ['1', '2', '3', '4'], ['5', '6', '7', '8'], ['9', '10', '11', '12'], ['13', '14', '15', '16'], ['17', '18', '19', '20']]
csv
and json
loaders are included, but adding or replacing a loader is easy!
>>> import dataimport
>>> import pandas
>>> dataimport.register('csv', pandas.read_csv)
>>> import dataimport.test.csv as datatable
>>> print(datatable)
col1 col2 col3 col4
0 1 2 3 4
1 5 6 7 8
2 9 10 11 12
3 13 14 15 16
4 17 18 19 20
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
dataimport-0.1.0.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for dataimport-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d8edd43dc4065981a151d124fb35d8158de13d52509d94a59bb79438352037b |
|
MD5 | 39e0e00ef123c8e5de4aae45276aa0c0 |
|
BLAKE2b-256 | 10ea16187ea9439b4dc6dbd19e931dc2d7783ad1b33a6436bd45545f8d9d1624 |