For example, you have to come to work on a Saturday in February to be reimbursed with a free Monday preceding a holiday Tuesday somewhere in May. They swap weekdays with Saturdays or Sundays to fill gaps between holidays and weekends. The Russian business calendar is cumbersome. Pandas would handle it in a sec, I thought. To obtain a headcount I had to calculate the number of business days each employee has spent with the company within the year. I had already been writing Python scripts, so I was not intimidated.
Our company introduced KPIs involving the revenue per employee, so we needed to know the average annual headcount of each team. You can build standard business day calendars as well as a variety of other schedules, simple or complex. Timeboard is a Python library that creates schedules of work periods and performs calendar calculations over them. By Maxim Mamaev Make your complex scheduling simple with timeboard, a Python library