Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Data Package reader for Pandas

License

NotificationsYou must be signed in to change notification settings

rgieseke/pandas-datapackage-reader

Repository files navigation

PyPICI

pandas-datapackage-reader

Easy loading of tabular data fromData Packages into Pandas DataFrames.

Installation

pip install pandas-datapackage-reader

Usage

frompandas_datapackage_readerimportread_datapackage# From GitHub repositorycountry_codes=read_datapackage("https://github.com/datasets/country-codes")# From local directorycountry_codes=read_datapackage("country-codes")# Data Package with GeoJSONgeo_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, seeLICENSE

About

Data Package reader for Pandas

Topics

Resources

License

Stars

Watchers

Forks

Contributors6


[8]ページ先頭

©2009-2025 Movatter.jp