熊猫数据包阅读器

pandas-datapackage-reader的Python项目详细描述


PyPITravisCodecov

熊猫数据包阅读器

轻松地将表格数据从Data Packages加载到pandas数据帧中。

安装

pip install pandas-datapackage-reader

用法

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")

数据包中的资源元数据作为字典返回到 _metadata属性。

country_codes._metadata

包含

{'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'},
# ...

许可证

bsd-2子句,请参见LICENSE

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何让ruby和maven协同工作   如何从Java代码中调用Excel VBA宏?   java是公共类的默认成员   java Android TextToSpeech总是无法运行   导入JAVA包的类不存在   java中有很多JSP/Servlet应用程序示例,为什么是。使用inc扩展代替。包含的jsp?   tomcat向JavaWebApp添加JAR   java如何在MySQL中向表中插入变量   java在Spring web app中找不到类[org.springframework.scheduling.quartz.SchedulerFactoryBean]   swing Java GUI布局建议   java Google HTTP库JSON解析,空值默认为True   java使用Eclipse和Apache Tomcat 9.0开发聊天机器人   java我可以使用vmware软件包更改虚拟机的IP地址吗?   java在单击“后台运行”后返回进度监视器对话框   java uibinder onload not调用   java Spring数据分页和排序存储库的工作原理