'Fit label encoder and return encoded labels
Parameters
y : array-like of shape [n_samples]
Target values.
Returns
y : array-like of shape [n_samples]'

def fit_transform(self, y):

    y = column_or_1d(y, warn=True)
    (self.classes_, y) = np.unique(y, return_inverse=True)
    return y
