title: Python XML Parser Loading Numbers as strings
body: <p>I have an xml file with about 15000 values in it.  I read it using </p>
  
  <p><code>import xml.etree.ElementTree as ET</code></p>
  
  <p>An example of how I pulled out a value is </p>
  
  <p><code>def get_year1_quantity(element):
      return element[5][0].text</code>
  I got all the data and put the different values into list, then put them into a pandas dataframe.</p>
  
  <p>I tried to filter the data by:</p>
  
  <p><code>filtered=this[this.Year1_Q &gt; this.Year2_Q]</code></p>
  
  <p>Everything went well in till I looked at the data in a csv file.  Only a few of the values are loaded as strings.  They go into excel as floats or int depending on the values.  I tried</p>
  
  <p><code>Year1_Q=[map(int, x) for x in Year1_Q]
          Year1_P=[map(float, x) for x in Year1_P]
          Year2_Q=[map(int, x) for x in Year2_Q]
          Year2_P=[map(float, x) for x in Year2_P]</code></p>
  
  <p>but it gave me an error, Year1_Q=[map(int, x) for x in Year1_Q]</p>
  
  <p>ValueError: could not convert string to int:</p>
  
  <p>It does not make sense to me that some numbers are loaded as numbers, while others are loaded as strings.  They are identical in the xml file.</p>
  
  <p>Has anyone had this problem before?</p>
  
  <p>I tried <code>this[columns]=this[columns].astype(float)</code> and got invalid literal for float(): 6,625.00</p>