title: label-encoder encoding missing values
body: <p>I am using the label encoder to convert categorical data into numeric values.</p>
  
  <p>How does LabelEncoder handle missing values?</p>
  
  <pre><code>from sklearn.preprocessing import LabelEncoder
  import pandas as pd
  import numpy as np
  a = pd.DataFrame(['A','B','C',np.nan,'D','A'])
  le = LabelEncoder()
  le.fit_transform(a)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>array([1, 2, 3, 0, 4, 1])
  </code></pre>
  
  <p>For the above example, label encoder changed NaN values to a category. How would I know which category represents missing values?</p>