import requests
import json
import pandas as pd
df = pd.read_csv('101618freq.csv',low_memory= False, dtype=object,encoding='gbk')
# 构造请求
req_geo_url = ''
req_geo_s = 'https://restapi.amap.com/v3/geocode/geo?address='
req_geo_e = '&key=e633ff2494c6ad96864c5b8a0e29d9d6'
req_regeo_url = ''
req_regeo_s = 'https://restapi.amap.com/v3/geocode/regeo?output=xml&location='
req_regeo_e = '&key=e633ff2494c6ad96864c5b8a0e29d9d6&radius=1000&extensions=all'
headers = {
'User-Agent':'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Media Center PC 6.0)',
}
list_err_url = [] # 存储错误的url
# 对标题进行重新排序,默认取第3列为地址,并追加后续列,如果已经有,则会保存。reIndex需要通过返回赋值,没有inplace参数。
new_colu
py-地址标准化
最新推荐文章于 2024-04-02 16:33:33 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)