I am currently working on a kaggle dataset House price prediction
It has errors in the latitude and latitude column, so I decided to use geopy to get right values for those two columns.
And it works fine if I use it on one single address but returns None if applied on entire column.
city = []
lat = []
longi = []
for addr in train_df['address']:
geolocator = Nominatim(user_agent="ram")
location = geolocator.geocode(addr), timeout=100, language = 'en')
city.append(location.address.split(',')[-4])
lat.append(location.latitude)
longi.append(location.longitude)
It returns None, maybe because of multiple time access.
Please help me suggest some other way to get latitude and longitude for the 'address' column of my dataframe(or some other library meant for the same job).