I am building a scheduler that calculates the number of hours each person works for a week. The dataframe looks like this:
>df
Shift Monday Tuesday Wednesday Thursday Friday Saturday Sunday
1 09-12 a c a c b b b
2 12-15 b d b d a a e
3 15-18 c e c e d e f
4 18-21 d f e f e f a
5 21-24 e a d d c d d
6 24-03 f b f e a b b
7 03-06 a c a a b a e
8 06-09 b d b f d e f
Additionally, I would like to have people who serve Shift 24-03 to have 4 hours instead of 3 hours. So the result would look something like this:
name hours
a 30
b 34
c 32
d 31.5
e 34
f 33