Create the dictionary for categorical columns. For example, Y7:Y7_1,Y7_2,....

dict_onehot(df, col_cat)

Arguments

df

Dataframe.

col_cat

categorical column index

Value

A dictionary that connects onehot form and factor form of the categorical columns.