Table of Contents
TODO: implement this using something other than yaml
TypedDataConverter Objects
class TypedDataConverter()
A class to coerce types on data.
To see available types:
.. code-block:: python
>>> from whylogs.core.types.typeddataconverter import TYPES >>> print("\n".join(sorted(TYPES.keys())))
convert
| @staticmethod
| convert(data)
Convert data
to a typed value
If a data
is a string, parse data
with yaml. Else, return data
unchanged
Note: this method is very slow, since it relies on the complex and python-based implementation of yaml.
get_type
| @staticmethod
| get_type(typed_data)
Extract the data type of a value. See typeddataconvert.TYPES
for
available types.
Parameters
typed_data Data processed by TypedDataConverter.convert
Returns
dtype : TYPES