evalml
evalml copied to clipboard
Clean up downcast functions
We currently have two functions for downcasting Nullable types to non-nullable types, downcast_int_nullable_to_double, and downcast_nullable_types. These two functions have different use cases.
The former aims to solely downcast IntegerNullable and AgeNullable to Double in order to support components that might not allow nullable integers.
The latter downcasts BooleanNullable to Boolean and IntegerNullable and AgeNullable to Double simultaneously. While ignore_null_cols as an argument can be set to False in order to downcast nullable numerics to Double without an issue, doing so for BooleanNullable will throw a type conversion error if nulls exist.
This issue covers creating one function that combines the flexibility of downcast_int_nullable_to_double with the coverage of downcast_nullable_types.