title: get coordinate (longitude and latitude) using google API in Python
body: <p>If I have address dataframe as follows:    </p>
  
  <pre><code>id                Address                        Latitude       Longitude 
  01   Via Benedetto Croce 112, Rome, Italy          
  02   Via Aristide Leonori 46, Rome, Italy
  03   Viale Marconi 197, Rome, Italy
  </code></pre>
  
  <p>How can i get their coordinates (longitude and latitude) using google API in Python? Thanks.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Here is what i find from Python client library for Google Maps API Web Services, but it fails with: raise googlemaps.exceptions.Timeout()</p>
  
  <p><a href="https://github.com/googlemaps/google-maps-services-python" rel="nofollow noreferrer">https://github.com/googlemaps/google-maps-services-python</a></p>
  
  <pre><code>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)
  </code></pre>