Skip to content

featurebyte.StringValueImputation

class StringValueImputation(
*,
imputed_value: Union[StrictInt, StrictFloat, StrictStr, bool, NoneType]=None,
type: Literal["is_string"]="is_string"
)

Description

StringValueImputation class is used to declare the operation to impute the value when the value in the column is of astring type.

If the imputed_value parameter is None, the values to impute are replaced by missing values and the corresponding rows are ignored during aggregation operations.

Parameters

  • imputed_value: Union[StrictInt, StrictFloat, StrictStr, bool, NoneType]
    The value that will be used to replace any string values.

  • type: Literal["is_string"]
    default: "is_string"

Examples

Create an imputation rule to replace string value with 0

>>> fb.StringValueImputation(imputed_value=0)