Home

Published

- 1 min read

for column in cleaned_df.columns: if cleaned_df[column].dtype == np.number: continue cleaned_df[column] = LabelEncoder().fit_trasform(cleaned_df[column])

img of for column in cleaned_df.columns:     if cleaned_df[column].dtype == np.number:         continue         cleaned_df[column] = LabelEncoder().fit_trasform(cleaned_df[column])

The solution for this is noted below

for column in cleaned_df.columns: if cleaned_df[column].dtype == np.number: continue cleaned_df[column] = LabelEncoder().fit_trasform(cleaned_df[column])

Solution

   for column in cleaned_df.columns:
    if cleaned_df[column].dtype == np.number:
        continue
        cleaned_df[column] = LabelEncoder().fit_trasform(cleaned_df[column])

Try other methods by searching on the site. That is if this doesn’t work