Skip to content

featurebyte.Feature.str.lstrip

lstrip(
to_strip: Optional[str]=None
) -> Feature

Description

Removes leading characters (whitespaces by default) from each string element.

Parameters

  • to_strip: Optional[str]
    Characters to remove, whitespace is used by default.

Returns

  • Feature
    A new Feature object.

Examples

Remove leading "M" characters from the ProductGroupLookup feature:

>>> feature = catalog.get_feature("ProductGroupLookup")
>>> feature_group = fb.FeatureGroup([feature])
>>> feature_group["ProductGroupStrip"] = feature.str.lstrip("M")