text_plain_output_1.png
import pandas as pd

train = pd.read_feather('../input/amex-train-dropped-1/train_dropped.feather')

typeTable = pd.concat([train.filter(regex='D_').dtypes, train.filter(regex='S_').dtypes], axis=1)

all_cols = train.columns.to_list()
cat_cols = ['B_30', 'B_38', 'D_114', 'D_116', 'D_117', 'D_120', 'D_126', 'D_63', 'D_64', 'D_66', 'D_68']
cat_cols_save_str = ['D_63', 'D_64']
str_cols = ['customer_ID']
date_cols = ['S_2']
df_dtype = {col: 'float16' for col in all_cols if col not in cat_cols + str_cols + date_cols}
for col in str_cols + cat_cols_save_str:
    df_dtype[col] = 'str'

for col in cat_cols_save_str:
    print(col)
    print(train[col].unique())