Skip to main content

Pandas Data Package Reader

Project description

PyPI Travis Codecov

pandas-datapackage-reader

Easy loading of tabular data from Data Packages into Pandas DataFrames.

Installation

pip install pandas-datapackage-reader

Usage

from pandas_datapackage_reader import read_datapackage

# From GitHub repository
country_codes = read_datapackage("https://github.com/datasets/country-codes")

# From local directory
country_codes = read_datapackage("country-codes")

# Data Package with GeoJSON
geo_countries = read_datapackage("https://github.com/datasets/geo-countries")

Resource metadata from the Data Package is returned as a dictionary in the _metadata attribute.

country_codes._metadata

contains

{'format': 'csv',
  'name': 'country-codes',
  'path': 'data/country-codes.csv',
  'schema': {'fields': [{'description': 'Country or Area official Arabic short name from UN Statistics Divsion',
        'name': 'official_name_ar',
        'title': 'official name Arabic',
        'type': 'string'},
      {'description': 'Country or Area official Chinese short name from UN Statistics Divsion',
        'name': 'official_name_cn',
        'title': 'official name Chinese',
        'type': 'string'},
# ...

License

BSD-2-Clause, see LICENSE

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

pandas-datapackage-reader-0.13.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

pandas_datapackage_reader-0.13.0-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pandas-datapackage-reader-0.13.0.tar.gz.

File metadata

  • Download URL: pandas-datapackage-reader-0.13.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.4

File hashes

Hashes for pandas-datapackage-reader-0.13.0.tar.gz
Algorithm Hash digest
SHA256 ce370413f5317958910e2f3a2676d822a09f6c56317d6fb7bed14709bc96075d
MD5 b8cb70cf1f20ff0a310a42dc4e68e076
BLAKE2b-256 573ffda1e017ac02d4f8d9f7bb7b07a48af9508b2b79ff46a4e910b23b812b41

See more details on using hashes here.

File details

Details for the file pandas_datapackage_reader-0.13.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pandas_datapackage_reader-0.13.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.4

File hashes

Hashes for pandas_datapackage_reader-0.13.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d19ee45c18f355b000ce8ab025cdae6050f28d5f7e0e0a5e086acdb350839278
MD5 b22b7e9b7b03f2ac82629b108e729c3d
BLAKE2b-256 56599d8d386ca95b41f55144ba9482ce9f7c62c21ab9314927244df4f18f0740

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