Skip to content

Column preprocessors

class Categorical

Categorical.__init__

def __init__(
base: int = 1024,
special_values: Sequence = (),
impute_nan: bool = False,
non_sample_values: Sequence = (),
protection: Protection = Protection()
) -> None

Categorical column preprocessor treating categories as ordinal values.

Arguments:

  • base - The base in which to represent the ordinal values associated to the categories.
  • special_values - A sequence of values to be handled separately as categories.
  • impute_nan - Whether to impute NaN values. If True, NaN values are replaced with other plausible values.
  • non_sample_values - A sequence of values that should not be sampled.
  • protection - A Protection object.

class Coordinates

Coordinates.__init__

def __init__(
base: int = 10,
digits: int = 10,
special_values: Sequence = (),
impute_nan: bool = False,
non_sample_values: Sequence = (),
protection: Protection = Protection()
) -> None

Coordinate column preprocessor.

Arguments:

  • base - Base in which to represent the coordinate values.
  • digits - Number of digits to keep in the coordinate values.
  • special_values - A sequence of values to be handled separately as categories.
  • impute_nan - Whether to impute NaN values. If True, NaN values are replaced with other plausible values.
  • non_sample_values - A sequence of values that should not be sampled.
  • protection - A Protection object.

class Date

Date.__init__

def __init__(
fmt: str | None = None,
special_values: Sequence = (),
impute_nan: bool = False,
non_sample_values: Sequence = (),
protection: Protection = Protection()
) -> None

Date column preprocessor respecting a weekly periodicity.

Arguments:

  • fmt - Datetime format. If None, it will be automatically inferred.
  • special_values - A sequence of values to be handled separately as categories.
  • impute_nan - Whether to impute NaN values. If True, NaN values are replaced with other plausible values.
  • non_sample_values - A sequence of values that should not be sampled.
  • protection - A Protection object.

class Time

Time.__init__

def __init__(
fmt: str | None = None,
special_values: Sequence = (),
impute_nan: bool = False,
non_sample_values: Sequence = (),
protection: Protection = Protection()
) -> None

Time column preprocessor.

Arguments:

  • fmt - Timetime format. If None, it will be automatically inferred.
  • special_values - A sequence of values to be handled separately as categories.
  • impute_nan - Whether to impute NaN values. If True, NaN values are replaced with other plausible values.
  • non_sample_values - A sequence of values that should not be sampled.
  • protection - A Protection object.

class Datetime

Datetime.__init__

def __init__(
date: Date | None = None,
time: Time | None = None,
fmt: str | None = None,
special_values: Sequence = (),
impute_nan: bool = False,
non_sample_values: Sequence = (),
protection: Protection = Protection()
) -> None

Datetime column preprocessor.

Arguments:

  • date - A Date preprocessor or None. If None, the default Date object is used.
  • time - A Time preprocessor or None. If None, the default Time object is used.
  • fmt - Datetime format. If None, it will be automatically inferred.
  • special_values - A sequence of values to be handled separately as categories.
  • impute_nan - Whether to impute NaN values. If True, NaN values are replaced with other plausible values.
  • non_sample_values - A sequence of values that should not be sampled.
  • protection - A Protection object.

class Integer

Integer.__init__

def __init__(
base: int = 10,
special_values: Sequence = (),
impute_nan: bool = False,
non_sample_values: Sequence = (),
protection: Protection = Protection()
) -> None

Integer column preprocessor.

Arguments:

  • base - Base in which to represent the integer values.
  • special_values - A sequence of values to be handled separately as categories.
  • impute_nan - Whether to impute NaN values. If True, NaN values are replaced with other plausible values.
  • non_sample_values - A sequence of values that should not be sampled.
  • protection - A Protection object.

class ItaFiscalCode

ItaFiscalCode.__init__

def __init__(
special_values: Sequence = (),
impute_nan: bool = False,
non_sample_values: Sequence = (),
protection: Protection = Protection()
) -> None

Column preprocessor for Italian Fiscal Code.

Arguments:

  • special_values - A sequence of values to be handled separately as categories.
  • impute_nan - Whether to impute NaN values. If True, NaN values are replaced with other plausible values.
  • non_sample_values - A sequence of values that should not be sampled.
  • protection - A Protection object.

class Numeric

Numeric.__init__

def __init__(
base: int = 10,
max_digits: int = 12,
special_values: Sequence = (),
impute_nan: bool = False,
non_sample_values: Sequence = (),
protection: Protection = Protection()
) -> None

Numeric column preprocessor.

Arguments:

  • base - The base of the numeric system.
  • max_digits - Number of digits to keep in the numeric values.
  • special_values - A sequence of values to be handled separately as categories.
  • impute_nan - Whether to impute NaN values. If True, NaN values are replaced with other plausible values.
  • non_sample_values - A sequence of values that should not be sampled.
  • protection - A Protection object.

class Text

Text column preprocessor.