Skip to content

featurebyte.Feature.dt.week

week: Feature

Description

Returns the week component of each element.

Returns

  • Feature
    Feature containing the week component values

Examples

Compute the week component of a timestamp column:

>>> feature = catalog.get_feature("CustomerLatestInvoiceTimestamp")
>>> feature_group = fb.FeatureGroup([feature])
>>> feature_group["TimestampWeek"] = feature.dt.week