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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdb9e853a080e1c2df718b9ae603e84908bcff6abf92ce8e3643db0f482c744c |
|
MD5 | b502158b234219960673a3db78460776 |
|
BLAKE2b-256 | bb7b77fc285ac967c70da9b4feac7730dd9f6e3c25151f8b0d49b8ddceebe408 |
Close
Hashes for pandas_datapackage_reader-0.13.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eb525c37b631387406a0f2e67f6897bb46b7273a014df9a78efa84d199b8c91 |
|
MD5 | 32c49d744537cefa9e87c60b9055c5da |
|
BLAKE2b-256 | 0d9811791c0ad6109a67b0a6211ce71de4b4f6bcc795586a7e22b28358bd0790 |