is_categorical#
- is_categorical(column: Series, max_categorical_ratio: float = 0.01, max_categories_type_string: int = 150, max_categories_type_int: int = 30, max_categories_type_float_or_datetime: int = 5) bool [source]#
Check if uniques are few enough to count as categorical.
- Parameters
- columnpd.Series
A dataframe column
- max_categorical_ratiofloat , default: 0.01
- max_categories_type_stringint , default: 150
- max_categories_type_intint , default: 30
- max_categories_type_float_or_datetimeint , default: 5
- Returns
- bool
True if is categorical according to input numbers