Pandas Data Package Reader
Project description
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
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
Built Distribution
Close
Hashes for pandas-datapackage-reader-0.14.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a13678e0926ef376e7384c8bf5f884c91398e9f4f723347775863fd2496f3ef1 |
|
MD5 | 5a9a86108260af563e147c2c214eba77 |
|
BLAKE2b-256 | 66fff08a29390fba83f4f1985c6d4314e984bd0dd60f0b705b0901d507efc779 |
Close
Hashes for pandas_datapackage_reader-0.14.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2fb4ba9372cd81ca3cc162faf90fbbcf8fb063a62754671aedea0cf09cdf0f6 |
|
MD5 | 91d815577919e0988e00276fdd515493 |
|
BLAKE2b-256 | db376dd2bf365a7b343d20b07ce15dee9e3f00140c7a23cc1cc49acc97e1ef50 |