Skip to content

featurebyte.ViewColumn.dt.month

month: FrozenSeries

Description

Returns the month component of each element.

Returns

  • FrozenSeries
    Column or Feature containing the month component values

Examples

Compute the month component of a timestamp column:

>>> view = catalog.get_view("GROCERYINVOICE")
>>> view["TimestampMonth"] = view["Timestamp"].dt.month
>>> view.preview(5).filter(regex="Timestamp")
            Timestamp  TimestampMonth
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               1
4 2022-01-12 17:36:23               1