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.18.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ced0bb44a9a703a67a956e3b0314238d48726b09ed9ae3ce140344561f900902 |
|
MD5 | 465c5154092ea4e07c3dbf86a3aaef87 |
|
BLAKE2b-256 | 84f30437587d461e64090dc1244c1b9c318353725249d292e9636ea5e1e9ca61 |
Close
Hashes for pandas_datapackage_reader-0.18.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4660b06f533ccc35eb2f9f7cefe52b9abb7da82f7e66ad5dc52ae1c85d13b1f |
|
MD5 | 07bab17af1d62687f9bd7d0992558eab |
|
BLAKE2b-256 | b8decfe7ef4af7badf889f95026634abd0b4c858dca61a6ecd9f7c281b55edb1 |