woodwork.logical_types.Ordinal#

class woodwork.logical_types.Ordinal(order=None)[source]#

Represents Logical Types that contain ordered discrete values. Has ‘category’ as a standard tag.

Parameters:

order (list or tuple) – An list or tuple specifying the order of the ordinal values from low to high. The underlying series cannot contain values that are not present in the order values.

Examples

["first", "second", "third"]
["bronze", "silver", "gold"]
__init__(order=None)[source]#

Methods

__init__([order])

transform(series[, null_invalid_values])

Validates the series and converts the dtype to match the logical type's if it is different.

validate(series[, return_invalid_values])

Validates that a logical type is consistent with the series dtype.

Attributes

primary_dtype

pyspark_dtype

standard_tags

type_string