美文网首页
2022-01-17 python pandas

2022-01-17 python pandas

作者: scoot929 | 来源:发表于2022-01-17 20:19 被阅读0次

如何遍历rows同时修改值

for index, row in rche_df.iterrows():
    if isinstance(row.wgs1984_latitude, float):
        row = row.copy()
        target = row.address_chi        
        dict_temp = geocoding(target)
        rche_df.loc[index, 'wgs1984_latitude'] = dict_temp['lat']
        rche_df.loc[index, 'wgs1984_longitude'] = dict_temp['long']

相关文章

网友评论

      本文标题:2022-01-17 python pandas

      本文链接:https://www.haomeiwen.com/subject/ckqhhrtx.html