0
点赞
收藏
分享

微信扫一扫

2021-06-05 数据清洗,把数据存入DataFrame并追加存入

utm = pd.DataFrame(columns=['name', 'easting', 'northing'])
for i in range(len(df[17].drop_duplicates().index)):
    print(df[10][df[17].drop_duplicates().index[i]])
    utm.loc[i]=[df[17][df[17].drop_duplicates().index[i]], 
                df[10][df[17].drop_duplicates().index[i]],
               df[11][df[17].drop_duplicates().index[i]]]

创建一个utm坐标的dataframe,对应表头为name,easting和northing。原df为一个df[17]重复出现很多次重复值的dataframe,对此去重,存入utm的每个行。

举报

相关推荐

0 条评论