whylogs.core.datatypes#

Module Contents#

Classes#

DataType

Helper class that provides a standard way to create an ABC using

Integral

Helper class that provides a standard way to create an ABC using

Fractional

Helper class that provides a standard way to create an ABC using

String

Helper class that provides a standard way to create an ABC using

AnyType

Helper class that provides a standard way to create an ABC using

TypeMapper

Helper class that provides a standard way to create an ABC using

StandardTypeMapper

Map a dtype (Pandas) or a Python type to a data type.

Attributes#

whylogs.core.datatypes.CategoricalDtype#
whylogs.core.datatypes.NT#
class whylogs.core.datatypes.DataType(tpe: Type[NT])#

Bases: abc.ABC, Generic[NT]

Helper class that provides a standard way to create an ABC using inheritance.

Parameters

tpe (Type[NT]) –

property return_type: Type[NT]#
Return type

Type[NT]

classmethod match(dtype_or_type: Any) bool#
Parameters

dtype_or_type (Any) –

Return type

bool

whylogs.core.datatypes.NumericalType#
whylogs.core.datatypes.NUMBER#
class whylogs.core.datatypes.Integral#

Bases: DataType[int]

Helper class that provides a standard way to create an ABC using inheritance.

property return_type: Type[NT]#
Return type

Type[NT]

classmethod match(dtype_or_type: Any) bool#
Parameters

dtype_or_type (Any) –

Return type

bool

class whylogs.core.datatypes.Fractional#

Bases: DataType[float]

Helper class that provides a standard way to create an ABC using inheritance.

property return_type: Type[NT]#
Return type

Type[NT]

classmethod match(dtype_or_type: Any) bool#
Parameters

dtype_or_type (Any) –

Return type

bool

class whylogs.core.datatypes.String#

Bases: DataType[str]

Helper class that provides a standard way to create an ABC using inheritance.

property return_type: Type[NT]#
Return type

Type[NT]

classmethod match(dtype_or_type: Any) bool#
Parameters

dtype_or_type (Any) –

Return type

bool

class whylogs.core.datatypes.AnyType#

Bases: DataType[Any]

Helper class that provides a standard way to create an ABC using inheritance.

property return_type: Type[NT]#
Return type

Type[NT]

is_compatible(value: Any) bool#
Parameters

value (Any) –

Return type

bool

classmethod match(dtype_or_type: Any) bool#
Parameters

dtype_or_type (Any) –

Return type

bool

class whylogs.core.datatypes.TypeMapper#

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

class whylogs.core.datatypes.StandardTypeMapper(custom_types: Optional[List[Type[DataType]]] = None)#

Bases: TypeMapper

Map a dtype (Pandas) or a Python type to a data type.

Parameters

custom_types (Optional[List[Type[DataType]]]) –