title: Replace incorrectly formatted values in a dataframe
body: <p>I am importing an Excel spreadsheet as a dataframe using pandas. The spreadsheet is manually maintained and contains several data entry errors, the most common of which is integers formatted as strings with leading non-breaking spaces ('\xa0'). The spreadsheet is updated regularly, so where and when these pesky inconsistencies pop up is totally unpredictable.</p>
  
  <p>Basically, I am trying to find a clean way to find and re-format these values. As they are mainly restricted to one column, I have tried several versions of this:</p>
  
  <pre><code>for entry in df.loc[:, 'col']:
      if type(row) == str:
          row = row.replace(u'\xa0', u'')
  </code></pre>
  
  <p>If I add a <code>print(row)</code> call inside the <code>for</code> loop, it prints exactly what I expect, i.e., '   1187383' becomes '1187383'. However, outside of the <code>for</code> loop, the value is not being replaced. Once the loop executes, calling <code>.loc</code> returns the unchanged entry ('  1187383').</p>
  
  <p>I'm sure I'm missing something obvious here, but I've now invested about a day trying to find the solution. Any help is appreciated! And please let me know if you need more information.</p>