On starting a new job in the new year 2020, one of the first things I remember was an issue with bank holidays. There was a handful of queries about the first week of January data. This was due to 01 January (a Wednesday) being classed as a working day, meaning various calculations and averages were skewed. It triggered the memory of my colleague that a table within the SQL database needed to be updated for all territories (>20).

I witnessed my colleague spend a significant period of time finding all these bank holidays manually and putting together a SQL query. I recall thinking to myself ‘next year that will be me’. Well, thankfully I was wrong.

A few weeks ago the reminder I set myself to update the bank holidays table went off. I did some research and came across the python package holidays.

#holidays #python #automation

Python: How to automate bank holidays
2.00 GEEK