woodwork icon indicating copy to clipboard operation
woodwork copied to clipboard

ColumnSchema utils `is_numeric` and `is_categorical` only work if logical type is set

Open tamargrey opened this issue 2 years ago • 0 comments

Currently the ColumnSchema utils is_numeric and is_categorical only look at the logical type when determining if a column schema is numeric or categorical in nature. In Featuretools, we often set just a "numeric" or "category" semantic tag in a column schema with no logical type in order to have the column schema be more general. Currently, those situations return False when checking is_numeric and is_categorical respectively.

Ideally, Woodwork would recognize both of those as numeric and categorical as follows:

col_schema = ColumnSchema(semantic_tags={'numeric'})
assert col_schema.is_numeric

col_schema = ColumnSchema(semantic_tags={'category'})
assert col_schema.is_categorical

tamargrey avatar Aug 23 '22 17:08 tamargrey