# import necessary libraries
import pandas as pd
from sklearn.datasets import load_iris

# load the iris dataset
iris = load_iris()

# convert the data to a Pandas dataframe
df = pd.DataFrame(iris.data, columns=iris.feature_names)

# add the target column to the dataframe
df['target'] = iris.target

# view the dataset
print(df.sample(5))

# import train_test_split
from sklearn.model_selection import train_test_split

# split the data into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(
                                      iris.data,
                                      iris.target,
                                      test_size = 0.2,
                                      random_state = 42)