application_vnd.jupyter.stderr_output_2.png text_plain_output_1.png
from sklearn.model_selection import train_test_split

from sklearn.preprocessing import LabelEncoder

import pandas as pd

df_iris = pd.DataFrame(pd.read_csv('/kaggle/input/iris/Iris.csv'))

df_iris.groupby('Species').size()

X = df_iris.iloc[:, 1:5]
y = pd.DataFrame(df_iris.iloc[:, 5])
display(X.head(3), y.head(3))
le = LabelEncoder()
y['Species'] = le.fit_transform(y['Species'])
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.4, random_state=0)
display(X_train.describe(), y_test.describe())