Skip to content

featurebyte.Feature.str.rstrip

rstrip(
to_strip: Union[str, NoneType]=None
) -> Feature

Description

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

Parameters

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

Returns

  • Feature
    A new Feature object.

Examples

Remove trailing "M" characters from the Title column:

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