infer_categorical_features#

infer_categorical_features(df: DataFrame, max_categorical_ratio: float = 0.01, max_categories: Optional[int] = None, columns: Optional[List[Hashable]] = None) List[Hashable][source]#

Infers which features are categorical by checking types and number of unique values.

Parameters
dfpd.DataFrame

dataframe for which to infer categorical features

max_categorical_ratiofloat , default: 0.01
max_categoriesint , default: None
columnst.Optional[t.List[Hashable]] , default: None
Returns
List[Hashable]

list of categorical features