Skip to content

featurebyte.Feature.str.len

len( ) -> Feature

Description

Computes length of each string element.

Returns

  • Feature
    A new Feature object.

Examples

Compute the length of each string element in the ProductGroupLookup feature:

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