transf_factor function

Convert categorical columns to factor