title: Cleaning headers in imported pandas dataframe
body: <p>Having imported a series of csv and xls files, using the header in the file. I've noticed that these headers aren't clean, so that when i call them i get an error returned saying there's no such attribute. What i'm looking to do is something similar to this;</p>
  
  <p>Use the built in function to create list of imported headers </p>
  
  <pre><code>currentheaders = list(df.columns.values)
  </code></pre>
  
  <p>Clean that list (this is the part i'm stuck on)</p>
  
  <pre><code>cleanedheaders = str.strip or regex equivalent
  </code></pre>
  
  <p>Apply that list as new headers</p>
  
  <pre><code>df.columns = ['cleanedheaders']
  </code></pre>
  
  <p>Strip doesn't work on lists and regex wants to be a data frame, is there an equivalent function for a list? </p>