티스토리 뷰

728x90
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']

https://stackoverflow.com/questions/25478528/updating-value-in-iterrow-for-pandas

 

Updating value in iterrow for pandas

I am doing some geocoding work that I used selenium to screen scrape the x-y coordinate I need for address of a location, I imported an xls file to panda dataframe and want to use explicit loop to ...

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[github] actions permissions  (0) 2022.08.10
[JPA] @Query update immediately  (0) 2022.08.10
[JPA] CreationTimestamp & UpdateTimestamp  (0) 2022.08.10
[pandas] DataFrame  (0) 2022.08.10
[spring] MockMvc  (0) 2022.08.10
댓글