title: Folium geo-mapping leads to TypeError: must be real number, not str while
body: <p>I have a mass of coordinates stored in a XML-File. They are parsed in Python and stored into Pandas DataFrame, which I want to use to map all those coordinates on a map.</p>
  
  <p>The whole parsing is working, even the DataFrame is correct. I tried to install folium via AUR, but same error. </p>
  
  <pre><code>#!/usr/bin/env python
  import pandas as pd
  import requests
  from xml.etree import ElementTree
  import numpy as np
  import folium
  
  xml_data = "coords.xml"
  
  tree = ElementTree.parse(xml_data)
  counter = tree.find('counter')
  
  id = []
  name = []
  latitude = []
  longitude = []
  
  for c in tree.findall('counter'):
      id.append(c.attrib['id'])
      name.append(c.find('name').text)
      latitude.append(c.find('latitude').text)
      longitude.append(c.find('longitude').text)
  
  df_counters = pd.DataFrame(
      {'ID' : id,
      'Name' : name,
      'latitude' : latitude,
      'longitude' : longitude
      })
  df_counters.head()
  
  locations = df_counters[['latitude', 'longitude']]
  locationlist = locations.values.tolist()
  
  map = folium.Map(location=[47.3, 5.2], zoom_start=10)
  for point in range(0, len(locationlist)):
      folium.Marker(locationlist[point], popup=df_counters['Name'][point]).add_to(map)
  map
  </code></pre>
  
  <p>The parsed xml file looks like this:</p>
  
  <pre><code>&lt;counter id="10084"&gt;
    &lt;name&gt;DSC_00458.JPG&lt;/name&gt;
    &lt;latitude&gt;47.4340525&lt;/latitude&gt;
    &lt;longitude&gt;8.208285&lt;/longitude&gt;
  &lt;/counter&gt;
  &lt;counter id="10085"&gt;
    &lt;name&gt;DSC_01287.JPG&lt;/name&gt;
    &lt;latitude&gt;47.3563725&lt;/latitude&gt;
    &lt;longitude&gt;12.449092499999999&lt;/longitude&gt;
  &lt;/counter&gt;
  </code></pre>
  
  <p>What I want to reach is, that I map all those coordinates as points on a map.
  But instead of getting the QT-Window of Folium, there's just the following message in stacktrace:</p>
  
  <pre><code>Traceback (most recent call last):
    File "./map.py", line 40, in &lt;module&gt;
      folium.Marker(locationlist[point], popup=df_counters['Name'][point]).add_to(map)
    File "/home/rtfm/.local/lib/python3.7/site-packages/folium/map.py", line 252, in __init__
      self.location = _validate_coordinates(location)
    File "/home/rtfm/.local/lib/python3.7/site-packages/folium/utilities.py", line 39, in _validate_coordinates
      if _isnan(coordinates):
    File "/home/rtfm/.local/lib/python3.7/site-packages/folium/utilities.py", line 65, in _isnan
      return any(math.isnan(value) for value in _flatten(values))
    File "/home/rtfm/.local/lib/python3.7/site-packages/folium/utilities.py", line 65, in &lt;genexpr&gt;
      return any(math.isnan(value) for value in _flatten(values))
  TypeError: must be real number, not str
  </code></pre>
  
  <p>I can't figure out, where the actual reason for the stacktrace is.
  Even if I try the original example from here: <a href="https://georgetsilva.github.io/posts/mapping-points-with-folium/" rel="nofollow noreferrer">https://georgetsilva.github.io/posts/mapping-points-with-folium/</a>
  I get the same error message back.</p>