You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hardcoded logic in our software causes metadata.detect_from_dataframe to fail in detecting new data types beyond the primitive ones. There is code that focuses only on primitive data types, ignoring others and raises an error that we only support those.
We should be able to detect the following data types:
UInt(8, 16, 32, 64) -- Pandas
uint(8, 16, 32, 64) -- Numpy
Additional Context
This is the current code that we use to detect data types. This has to be enhanced to support more data types.
ifdtypeinself._DTYPES_TO_SDTYPES:
sdtype=self._DTYPES_TO_SDTYPES[dtype]
elifdtypein ['i', 'f']:
sdtype=self._determine_sdtype_for_numbers(column_data)
elifdtype=='O':
sdtype=self._determine_sdtype_for_objects(column_data)
ifsdtypeisNone:
raiseInvalidMetadataError(
f"Unsupported data type for column '{field}' (kind: {dtype}).""The valid data types are: 'object', 'int', 'float', 'datetime', 'bool'."
)
In order to support a wider range of dtypes, we have to enhance this logic by adding more dtype mappings. With the given configuration, we are not supporting Pandas nullable ints and other data types that are not the primitive ones loaded with a numpy backend.
The text was updated successfully, but these errors were encountered:
Error Description
Hardcoded logic in our software causes
metadata.detect_from_dataframe
to fail in detecting new data types beyond the primitive ones. There is code that focuses only on primitive data types, ignoring others and raises an error that we only support those.Steps to reproduce
Expected behavior
We should be able to detect the following data types:
Additional Context
This is the current code that we use to detect data types. This has to be enhanced to support more data types.
In order to support a wider range of dtypes, we have to enhance this logic by adding more dtype mappings. With the given configuration, we are not supporting Pandas nullable ints and other data types that are not the primitive ones loaded with a numpy backend.
The text was updated successfully, but these errors were encountered: