Skip to content

featurebyte.ViewColumn.dt.week

week: FrozenSeries

Description

Returns the week component of each element.

Returns

  • FrozenSeries
    Column or Feature containing the week component values

Examples

Compute the week component of a timestamp column:

>>> view = catalog.get_view("GROCERYINVOICE")
>>> view["TimestampWeek"] = view["Timestamp"].dt.week
>>> view.preview(5).filter(regex="Timestamp")
            Timestamp  TimestampWeek
0 2022-01-03 12:28:58              1
1 2022-01-03 16:32:15              1
2 2022-01-07 16:20:04              1
3 2022-01-10 16:18:32              2
4 2022-01-12 17:36:23              2