featurebyte.to_timedelta¶
to_timedelta(
series: Series,
unit: Literal["day", "hour", "minute", "second", "millisecond", "microsecond"]
) -> SeriesDescription¶
Construct a timedelta Series that can be used to increment a datetime Series.
Parameters¶
- series: Series
Series representing the amount of time unit - unit: Literal["day", "hour", "minute", "second", "millisecond", "microsecond"]
A supported unit in str
Returns¶
- Series
Raises¶
- ValueError
if input Series is not of INT type
Examples¶
Create a new column in the INVOICEITEMS view that represents the number of days since the last invoice.
Create a new column that is 10 minutes after the event.