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.13.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce370413f5317958910e2f3a2676d822a09f6c56317d6fb7bed14709bc96075d |
|
MD5 | b8cb70cf1f20ff0a310a42dc4e68e076 |
|
BLAKE2b-256 | 573ffda1e017ac02d4f8d9f7bb7b07a48af9508b2b79ff46a4e910b23b812b41 |
Close
Hashes for pandas_datapackage_reader-0.13.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d19ee45c18f355b000ce8ab025cdae6050f28d5f7e0e0a5e086acdb350839278 |
|
MD5 | b22b7e9b7b03f2ac82629b108e729c3d |
|
BLAKE2b-256 | 56599d8d386ca95b41f55144ba9482ce9f7c62c21ab9314927244df4f18f0740 |