Working with custom business days
Companies have different working days worldwide, influenced by the region or territory they belong to. For example, when working with time-series data, and depending on the analysis you need to make, knowing whether certain transactions fall on a workday or weekend can make a difference. For instance, if you are performing anomaly detection and know that certain types of activities can only be done during working hours, any activities beyond these boundaries may trigger further analysis.In this recipe, you will see how you can customize an offset to fit your requirements when doing an analysis that depends on defined business days and non-business days.
How to do it…
In this recipe, you will create custom business days and holidays for a company headquartered in Amman, Jordan. In Jordan, the working week is from Sunday to Thursday, whereas Friday and Saturday are weekends. Additionally, Labor Day is on May 1 and Independence Day is on May 25 of...