Skip to content

featurebyte.ViewColumn.dt.day_of_week

day_of_week: FrozenSeries

Description

Returns the day-of-week component of each element. The day of week is mapped to an integer value ranging from 0 (Monday) to 6 (Sunday).

Returns

  • FrozenSeries
    Column or Feature containing the day of week component values

Examples

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