当我尝试在 geopandas 中使用地理编码功能时,我正在尝试修复我遇到的错误。
from geopandas.geocode import geocode
df['latlong'] = geocode(df.Location, provider="mapquest")
这就是我所看到的:
/Users/.../lib/python2.7/site-packages/geopandas-0.1.0.dev_- py2.7.egg/geopandas/geocode.pyc in geocode(strings, provider, **kwargs)
72 'mapquest': geopy.geocoders.MapQuest,
73 'openmapquest': geopy.geocoders.OpenMapQuest,
---> 74 'nominatim' : geopy.geocoders.Nominatim}
75
76 if provider not in coders:
AttributeError: 'module' object has no attribute 'Nominatim'
我确实尝试使用此处的说明安装插件,但没有任何乐趣:https ://github.com/rdeguzman/python-nominatim