Skip to main content

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


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 details)

Uploaded Source

Built Distribution

dataimport-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file dataimport-0.1.0.tar.gz.

File metadata

  • Download URL: dataimport-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for dataimport-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9a771c592dbe33eb1332d11e54b8693fec991fe60840722c1e46730b6349b41f
MD5 06186c928eacf5f376444d9210ed7bef
BLAKE2b-256 56ee742de63890c5d2c8fb98d393edd1465d19c4e4acde9feaf7309e71642480

See more details on using hashes here.

File details

Details for the file dataimport-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dataimport-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for dataimport-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d8edd43dc4065981a151d124fb35d8158de13d52509d94a59bb79438352037b
MD5 39e0e00ef123c8e5de4aae45276aa0c0
BLAKE2b-256 10ea16187ea9439b4dc6dbd19e931dc2d7783ad1b33a6436bd45545f8d9d1624

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page