handle pandas.Categorical-valued factors as categorical data