title: How do I fix the key error 0 in Geocoder with python
body: <p>I am trying to map out the latitude and longitude from a column of addresses from a data frame. But it keeps giving me key error 0.</p>
  <pre><code>for i in range(len(df['addresses'])):
      g = geocoder.arcgis(df['addresses'][i])
      coordinates.append(tuple(g.latlng))
  </code></pre>
  <p>Here is the error message</p>
  <pre><code>---------------------------------------------------------------------------
  KeyError                                  Traceback (most recent call last)
  &lt;ipython-input-43-8a4466f30728&gt; in &lt;module&gt;
        1 coordinates = []
        2 for i in range(len(df['addresses'])):
  ----&gt; 3     g = geocoder.arcgis(df['addresses'][i])
        4     coordinates.append(tuple(g.latlng))
  
  ~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/series.py in __getitem__(self, key)
     1069         key = com.apply_if_callable(key, self)
     1070         try:
  -&gt; 1071             result = self.index.get_value(self, key)
     1072 
     1073             if not is_scalar(result):
  
  ~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py in get_value(self, series, key)
     4728         k = self._convert_scalar_indexer(k, kind=&quot;getitem&quot;)
     4729         try:
  -&gt; 4730             return self._engine.get_value(s, k, tz=getattr(series.dtype, &quot;tz&quot;, None))
     4731         except KeyError as e1:
     4732             if len(self) &gt; 0 and (self.holds_integer() or self.is_boolean()):
  
  pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_value()
  
  pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_value()
  
  pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
  
  pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.Int64HashTable.get_item()
  
  pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.Int64HashTable.get_item()
  
  KeyError: 0
  </code></pre>