text_plain_output_1.png
from sklearn.preprocessing import MinMaxScaler

import numpy as np

import pandas as pd

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

df = df.dropna()
df = df.replace([np.inf, -np.inf], np.nan)
df = df.dropna()
df = df.drop(['Id'], axis=1)

scaler = MinMaxScaler()
cols_to_scale = df.columns[:-1]
df_norm = pd.DataFrame(scaler.fit_transform(df[cols_to_scale]), columns=cols_to_scale)
df_norm = pd.concat([df_norm, df.iloc[:, -1]], axis=1)

df = df_norm

df.shape

print(df['Species'].unique())
print(df['Species'].value_counts())