google / temporian

Temporian is an open-source Python library for preprocessing ⚡ and feature engineering 🛠 temporal data 📈 for machine learning applications 🤖
https://temporian.readthedocs.io
Apache License 2.0
645 stars 43 forks source link

Feature: timestamp_in operator #392

Open javiber opened 3 months ago

javiber commented 3 months ago

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)
akshatvishu commented 3 months ago

can i work on this?

javiber commented 3 months ago

Hi @akshatvishu, All yours!