Unable to drop a column from pandas dataframe
<p>I have imported a Excel sheet into pandas. It has 7 columns which are numeric and 1 column which is a string (a flag).</p>

<p>After converting the flag to a categorical variable, I am trying to drop the string column from the Pandas dataframe. However, I am not able to do it.</p>

<p>Here's the code:</p>

<pre><code>[In] parts_median_temp.columns

[Out] Index([u'PART_NBR', u'PRT_QTY', u'PRT_DOL', u'BTS_QTY', u'BTS_DOL', u'Median', u'Upper_Limit', u'Flag_median'], dtype='object')
</code></pre>

<p>The column I'm trying to drop is 'Flag_median'.</p>

<pre><code>[In] parts_median_temp.drop('Flag_median') 

[Out] ...ValueError: labels ['Flag_median'] not contained in axis
</code></pre>

<p>Help me drop the <code>Flag_median</code> column from the Pandas dataframe.</p>