TextData.cast_to_dataset#

classmethod TextData.cast_to_dataset(obj: Any) TextData[source]#

Verify Dataset or transform to Dataset.

Function verifies that provided value is a non-empty instance of Dataset, otherwise raises an exception, but if the ‘cast’ flag is set to True it will also try to transform provided value to the Dataset instance.

Parameters
obj

value to verify

Raises
DeepchecksValueError

if the provided value is not a TextData instance; if the provided value cannot be transformed into Dataset instance;