Hi mentors and peer,
From below table as input, we are trying to add a column from Address using geopy Nominatim, in order to calculate distance with user input coordinate to sample only dataset within certain radius, say 5 miles.
From below code => we get all coordinates of 487 rows from original 501 rows. We deleted 14 addresses that can’t be converted, but had trouble appending this data (with different length than 501 rows) to the table.
So we did research and found something useful on: https://stackoverflow.com/questions/31414481/new-column-with-coordinates-using-geopy-pandas
See below codes:
We tried to run these 2 codes separately but it kept running and seemed won’t stop and give a column.
As we know 14 addresses can’t be converted, how shall we modify our code to include BaseException? Any way we can make this work?
We feel we are so close, any hint would be greatly appreciated!