我有CKAN几个疑问:负载CKAN数据集
如何:
- 负荷从网络
- 一个CKAN数据集改变这个数据集为大熊猫数据帧
And我需要在ckan网站注册才能查询数据?
我使用Pyhton 3.6.1
编辑2: 我曾试图后续代码:
import urllib
url = 'http://dados.cvm.gov.br/api/action/datastore_search?resource_id=92741280-58fc-446b-b436-931faaca4fb4&q=CNPJ_FUNDO:11.286.399/0001-35'
fileobj = urllib.request.urlopen(url)
print(fileobj.read())
但是,结果是这样的:
b '{“help”: “http://dados.cvm.gov.br/api/3/action/help_show?name=datastore_search”, “success”:true,“result”:{“resource_id”: “92741280-58fc-446b-b436-931faaca4fb4”,“fields”:[{“type”:“int4”, “id”:“_id”},{“type”:“text”,“id” “CNPJ_FUNDO”},{“type”: “timestamp”,“id”:“DT_COMPTC”},{“type”:“numeric”,“id”: “VL_TOTAL”},{“type”:“numeric “,”id“:”VL_QUOTA“},{”type“: ”numeric“,”id“:”VL_PATRIM_LIQ“},{”type“:”numeric“,”id“: ”CAPTC_DIA“ “type”:“numeric”,“id”:“RESG_DIA”},{“type”: “numeric”,“id”:“NR_COTST”},{“type”:“int8”,“id” _full_count“}, {”type“:”float4“,”id“:”rank“}],”q“: ”CNPJ_FUNDO:11.286.399/0001-35“,”records“:[],”_links “:{”start“: ”/api/action/datastore_search?q=CNPJ_FUNDO%3A11.286.399%2F0001-35 & resource_id = 92741280-58fc-446b-b436-931faaca4fb4“,”next“ : “/api/action/datastore_search?q=CNPJ_FUNDO%3A11.286。399%2F0001-35 &偏移量= 100 & RESOURCE_ID = 92741280-58fc-446B-b436-931faaca4fb4" }}}”
我需要像this image
欢迎计算器。正如目前所说,你的问题有点过于通用。如果您更新您的问题以证明您迄今为止已尝试过,并分享您之前关于此主题的研究,则您可能会得到更好的答案。 –
顺便说一句,在你链接的页面中有一个Python例子(点击“API de Dados”链接并向下滚动),你有什么问题吗? –
我没有尝试过任何东西,因为这是个疑问:如何使用Web链接来研究/加载ckan数据集。 – Matheus