# Get list of categorical variables

PHOTO EMBED

Thu Aug 05 2021 10:36:25 GMT+0000 (Coordinated Universal Time)

Saved by @CaoimhedeFrein #python

s = (X_train.dtypes == 'object')
object_cols = list(s[s].index)

print("Categorical variables:")
print(object_cols)
content_copyCOPY