Skip to content

featurebyte.Target.dt.hour

hour: Target

Description

Returns the hour component of each element. This is also available for Targets containing timedelta values, which is a result of taking the difference between two timestamp Targets.

Returns

  • Target
    Target containing the hour component values

Examples

Compute the hour component of a timestamp column:

>>> target = catalog.get_target("target_latest_invoice_timestamp")
>>> target_timestamp_hour = target.dt.hour