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.15.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8bcef889f8e2b867ad8ea1602b4d81c40c330d1e81f9ba794eb2755ba026bad |
|
MD5 | 56422d94556c9b84d36b02240567d9ca |
|
BLAKE2b-256 | c524b1f8f80a0b826dedc6e88a4188de06078c1893b56b5c85e14e0b36c456b5 |
Close
Hashes for pandas_datapackage_reader-0.15.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3f7c8b628e875e5a7a45c83dcc263c334c33a1a14e7cc73d98fbdf090671d2a |
|
MD5 | b9b885ffd7b7ba4875efb4cf1c978627 |
|
BLAKE2b-256 | 1e2cca4283fc36cc2f542cb4ab3c8701b0f77c30585cc6e68ce37c50cb233790 |