Skip to content

featurebyte.Target.str.contains

contains(
pat: str,
case: bool=True
) -> Target

Description

Checks whether each string element contains the provided substring pattern.

Parameters

  • pat: str
    Substring pattern.

  • case: bool
    default: True
    Whether the check is case-sensitive.

Returns

  • Target
    A new Target object.

Examples

Check whether the ProductGroupLookup target contains "x64":

>>> target = catalog.get_target("ProductGroupLookup")
>>> target["ProductGroup_x64"] = target.str.contains("x64")