title: Pandas: Dataframe.Drop - ValueError: labels ['id'] not contained in axis
body: <p>Attempting to drop a column from a <code>DataFrame</code> in Pandas.  <code>DataFrame</code> created from a text file.<br><br></p>
  
  <pre><code>import pandas as pd 
  df = pd.read_csv('sample.txt')
  df.drop(['a'], 1, inplace=True)
  </code></pre>
  
  <p>However, this generates the following error: <br></p>
  
  <pre><code>ValueError: labels ['a'] not contained in axis      
  </code></pre>
  
  <p>Here is a copy of the <code>sample.txt</code> file :</p>
  
  <pre><code>a,b,c,d,e
  1,2,3,4,5
  2,3,4,5,6
  3,4,5,6,7
  4,5,6,7,8
  </code></pre>
  
  <p>Thanks in advance.</p>