31python输出北京某天人口迁出数据(书案02)秒懂

results = res_text.replace("JSONP_LOADER&&JSONP_LOADER(", "").replace(",])", "]")

JSONP_LOADER&&JSONP_LOADER([["重庆",169684,0.000,0.230,0.770],["上海",153319,0.110,0.360,0.530],["廊坊",91736,0.530,0.470,0.000],["长沙",80553,0.100,0.310,0.590],["杭州",57798,0.090,0.410,0.500],["武汉",53161,0.100,0.620,0.280],["保定",38749,0.350,0.650,0.000],["南京",36382,0.100,0.760,0.140],["天津",32204,0.270,0.730,0.000],["西安",31350,0.110,0.530,0.360],])

这个意思是用

JSONP_LOADER&&JSONP_LOADER(           替换为                  空

,])                                                                       替换为                    ]

这样结果也就如下了:

[["重庆",169684,0.000,0.230,0.770],["上海",153319,0.110,0.360,0.530],["廊坊",91736,0.530,0.470,0.000],["长沙",80553,0.100,0.310,0.590],["杭州",57798,0.090,0.410,0.500],["武汉",53161,0.100,0.620,0.280],["保定",38749,0.350,0.650,0.000],["南京",36382,0.100,0.760,0.140],["天津",32204,0.270,0.730,0.000],["西安",31350,0.110,0.530,0.360]]

 

That's all ,thanks erverybody!

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页