training deep leaning models listing - extracting categorical columns from the dataset #extract categorical columns from dataset categorical_columns df select_dtypes(include="object"columns print("categorical cols:",list(categorical_columns)#for each categorical column if values in (yes/noconvert into / flag for col in categorical_columnsif df[colnunique(= df[colnp where(df[col]=="yes", , df head(we can see that our target column deposit and few other columnsincluding loaddefaultand housinghave been converted to binary flag (manuallyfor the remaining set of columns that have non-binary categorical valueswe can leverage pandas get_dummies function to automatically process the same listing - performs one-hot encoding for the categorical variables within the dataset listing - one-hot encoding for the remaining non-binary categorical variables #for the remaining cateogrical variables#create one-hot encoded version of the dataset new_df pd get_dummies(df#define target and predictors for the model