0
I’ve seen some similar questions as mine here, but since I’m very new to Python, I’m not getting around to making my mistake. My program is very short, I simply want to find the coordinates of latitude and longitude from names of municipalities that I read from a CSV (Listaend.csv). When running the program I get the error message:
Traceback (Most recent call last): File "teste2.py", line 26, in print(Location.address) Attributeerror: 'Nonetype' Object has no attribute 'address'
The program is:
import geopandas as gpds
import pandas as pds
from geopy.geocoders import Nominatim
df = pds.read_csv("ListaEnd.csv", encoding='UTF8')
geolocator = Nominatim(user_agent="Intro Geocode")
location = geolocator.geocode(df['Municipio'])
print(location.address)
print((location.latitude, location.longitude))
Any help is very valid, friends. Since now, it has been worth too much!!!
What is the value of
df['Municipio']
, you have a string with the address or maybe a list?– Jobert
df['Municipios'] are names of Brazilian municipalities, such as: Ji-Paraná, Campo Grande, Iporá, ...
– RAUL GB MENDES