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

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pandas_datapackage_reader-0.9.5-py2.py3-none-any.whl (4.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for pandas_datapackage_reader-0.9.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 30cc514751f16b4476142fe00f5962c092bf7fd2ca8fbb20b8e35b12e065a5d6
MD5 b4ea922725f4e3ccc06d213712159c39
BLAKE2b-256 a22757d089cddc9bb088c6046192a38009f1a4c443922b555f347524a0c99adb

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