title: Cleaning HTML tables with Pandas
body: <p>I would like to read a table on a website and parse the values. For this I did the following: </p>
  
  <pre><code>url = 'http://www.astro.keele.ac.uk/jkt/debcat/'    
  df = pd.read_html(url, header=0)
  </code></pre>
  
  <p>Even with header=0, I am still left with a header with is df[0], so I do the following: </p>
  
  <pre><code>df = df[1]
  df1.shape
  (161, 11)
  df1.columns
  Index([u' System ', u' Period (days) ', u' V  B-V ', u' Spectral type ', u' Mass (Msun )', u' Radius (Rsun) ', u' Surface gravity (cgs) ', u' log Teff (K) ', u' log (L/Lsun) ', u' [M/H]  (dex) ', u' References and notes '], dtype='object')
  </code></pre>
  
  <p>However, I cannot get </p>
  
  <pre><code>df1.Period
  </code></pre>
  
  <p>'DataFrame' object has no attribute 'period'</p>
  
  <p>Nor can I do, </p>
  
  <pre><code>df1.to_csv('junk.csv')
  </code></pre>
  
  <p>So, how do I access the columns and clean the table? Thanks!</p>