Если у меня есть адресный фрейм данных следующим образом:
id Address Latitude Longitude
01 Via Benedetto Croce 112, Rome, Italy
02 Via Aristide Leonori 46, Rome, Italy
03 Viale Marconi 197, Rome, Italy
Как я могу получить их координаты (долготу и широту), используя Google API в Python?Спасибо.
id Address Latitude Longitude
01 Via Benedetto Croce 112, Rome, Italy 41.8423561 12.48535240000001
02 Via Aristide Leonori 46, Rome, Italy 41.8487061 12.488554900000054
03 Viale Marconi 197, Rome, Italy 41.8567032 12.465537500002210
Вот то, что я нахожу из клиентской библиотеки Python для веб-служб API Карт Google, но это не удается с помощью: поднимите googlemaps.exceptions.Timeout ()
https://github.com/googlemaps/google-maps-services-python
import googlemaps
from datetime import datetime
gmaps = googlemaps.Client(key='googlemap ak')
# Geocoding an address
geocode_result = gmaps.geocode('Via Benedetto Croce 112, Rome, Italy')
print(geocode_result)