Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: timestamp_in operator #392

Open
javiber opened this issue Mar 12, 2024 · 2 comments
Open

Feature: timestamp_in operator #392

javiber opened this issue Mar 12, 2024 · 2 comments
Assignees
Labels
good first issue Good for newcomers new operator Development of a new operator.

Comments

@javiber
Copy link
Collaborator

javiber commented Mar 12, 2024

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)
@javiber javiber added good first issue Good for newcomers new operator Development of a new operator. labels Mar 12, 2024
@akshatvishu
Copy link
Contributor

can i work on this?

@javiber
Copy link
Collaborator Author

javiber commented Mar 19, 2024

Hi @akshatvishu, All yours!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers new operator Development of a new operator.
Projects
None yet
Development

No branches or pull requests

2 participants