Machine Learning, Artificial Intelligence, Breast Cancer Awareness, Classification, Machine Learning Projects.
the columns are in float value except the “diagnosis” column (our label column). We need to convert that into numbers before proceeding further. Let’s do that using Label Encoder. from sklearn.preprocessing import LabelEncoder le = LabelEncoder() df['diagnosis'] = le.fit_transform(df['diagnosis'])