Change the levels of categorical columns into integer numbers

factor_ordinal_encode(df, idx_col_cat)

Arguments

df

Dataframe

idx_col_cat

Categorical columns index

Value

Dataframe after encoding the categorical columns