您当前的位置:首页 > 新闻中心 > 科技资讯

如何用Python读取开放数据

时间:2017-12-15 11:48:50  
print(json.dumps(data, indent=2))
{
  "dataset": {
    "dataset_code": "M550_SALES",
    "column_names": [
      "Date",
      "Value"
    ],
    "newest_available_date": "2016-06-30",
    "description": "The Zillow Home Value Index is Zillow's estimate of the median market value of home sales (nsa) within the metro of Morehead City, NC. This data is calculated by Zillow Real Estate Research (www.zillow.com/research) using their database of 110 million homes.",
    "end_date": "2016-06-30",
    "data": [
      [
        "2016-06-30",
        64.0
      ],
      [
        "2016-05-31",
        163.0
      ],

可以看到,JSON文件就像是一个大的字典(dictionary)。我们选择其中的某个索引,就能获得对应的数据。

我们选择“dataset”:

来顶一下
返回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
推荐资讯
油坊店:毛竹“打一针” “多子”又“壮孙”
油坊店:毛竹“打一针
相关文章
    无相关信息
栏目更新
栏目热门