google/temporian

Feature: timestamp_in operator

Opened this issue · 2 comments

We can already do this with the existing operators but it's not easy to discover for new users, for instance, if you have an EventSet with daily sales and another with the holidays, you can do

days_since_last_holiday = holidays.propagate(daily_sales).since_last(sampling=daily_sales)
is_holiday = tp.equal(days_since_last_holiday, 0).rename('is_holiday')

We want to create a new operator to calculate whether the timestamp of a given EventSet is present in another like this:

is_holiday = daily_sales.timestamp_in(holidays, margin: tp.Duration = tp.duration.shortest)

can i work on this?

Hi @akshatvishu, All yours!