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.17.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51a38f3e0596917178e2d7032088712c4aaabd029584c5914a533b4075b8bb06 |
|
MD5 | 385d5bd761f5b3720b283b83604e43bd |
|
BLAKE2b-256 | a602cb349dec8d6bfa9189bc88e8731ee4e240ff23196d0b3cd245d7f7ddf28b |
Close
Hashes for pandas_datapackage_reader-0.17.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f389d26f6ebae47023c320c6bec5ae417e3c9cda0462bbc2f747128a816ee098 |
|
MD5 | 57bedd586f7891bfacd5c2ef5f3c35c1 |
|
BLAKE2b-256 | 394346aa1e1599beadf4351bef36e0b498f10629d6400f144191b8f2b0bf0f4e |