image_output_1.png
import pandas as pd #To work with dataset

train = pd.read_csv('../input/30-days-of-ml/train.csv')
test = pd.read_csv('../input/30-days-of-ml/test.csv')

cat_columns = train.drop(['id', 'target'], axis=1).select_dtypes(exclude=['int64', 'float64']).columns
num_columns = train.drop(['id', 'target'], axis=1).select_dtypes(include=['int64', 'float64']).columns
train[train.select_dtypes(['float64']).columns] = train[train.select_dtypes(['float64']).columns].apply(pd.to_numeric)
train[train.select_dtypes(['object']).columns] = train.select_dtypes(['object']).apply(lambda x: x.astype('category'))

num_columns = ['cont0', 'cont1', 'cont2', 'cont3', 'cont4', 'cont5', 'cont6', 'cont7', 'cont8', 'cont9', 'cont10', 'cont11', 'cont12', 'cont13']
cat_columns = ['cat0', 'cat1', 'cat2', 'cat3', 'cat4', 'cat5', 'cat6', 'cat7', 'cat8', 'cat9']
all_columns = num_columns + cat_columns
print(cat_columns)
print(num_columns)
print(all_columns)