In the below piece of code, we have converted the data types of the data variables to object type with categorical codes assigned to them. lis = [] for i in range(0, marketing_train.shape[1]): if(marketing_train.iloc[:,i].dtypes == 'object'): marketing_train.iloc[:,i] = pd....