Data Science, Machine Learning, Artificial Intelligence, Technology, Data.
le = LabelEncoder() # Fit and transform the target column # Again - make sure you replace Flower with your Target!!! df['Flower'] = le.fit_transform(df['Flower']) # Print the mapping print(dict(zip(le.classes_, le.transform(le.classes_)))) Now, we separate the features (X) from the target (y). X =