LabelEncoder specify classes in DataFrame
<p>I’m applying a LabelEncoder to a pandas DataFrame, <code>df</code></p>

<pre><code>Feat1  Feat2  Feat3  Feat4  Feat5
  A      A      A      A      E
  B      B      C      C      E
  C      D      C      C      E
  D      A      C      D      E
</code></pre>

<p>I'm applying a label encoder to a dataframe like this - </p>

<pre><code>from sklearn import preprocessing
le = preprocessing.LabelEncoder()
intIndexed = df.apply(le.fit_transform)
</code></pre>

<p>This is how the labels are mapped</p>

<pre><code>A = 0
B = 1
C = 2
D = 3
E = 0
</code></pre>

<p>I'm guessing that <code>E</code> isn't given the value of <code>4</code> as it doesn't appear in any other column other than <code>Feat 5</code> .</p>

<p>I want <code>E</code> to be given the value of <code>4</code> - but don't know how to do this in a DataFrame.</p>