title: LabelEncoder that keeps missing values as 'NaN'
body: <p>I am rying to use the label encoder in orrder to convert categorical data into numeric values.</p>
  
  <p>I needed a LabelEncoder that keeps my missing values as 'NaN' to use an Imputer afterwards. So I would like to use a mask to replace form the original data frame after labelling like this </p>
  
  <pre><code>df = pd.DataFrame({'A': ['x', np.NaN, 'z'], 'B': [1, 6, 9], 'C': [2, 1, np.NaN]})
  
  
      A   B   C
  0   x   1   2.0
  1   NaN 6   1.0
  2   z   9   NaN
  
  
  dfTmp = df
  mask = dfTmp.isnull()
  
         A    B   C
  0   False   False   False
  1   True    False   False
  2   False   False   True
  </code></pre>
  
  <p>So I get a dataframe with True/false value</p>
  
  <p>Then , in create the encoder : </p>
  
  <pre><code>df = df.astype(str).apply(LabelEncoder().fit_transform)
  </code></pre>
  
  <p>How can I proceed then, in orfer to encoder these values?</p>
  
  <p>thanks</p>