def imputerLabelEncoder_train(X,y): imputer = preprocessing.Imputer() X = imputer.fit_transform(X) le = preprocessing.LabelEncoder() y = le.fit_transform(y) return X,y,imputer,le