I have a list of (many) employees in Excel/csv who take sick days, listed in the following format. Each sick day instance gets it's own line. I want to add another column 'Result', which records the length of the sick-period. For example, Mon-Tues-Wed means each of these three entries get labelled with a 3.
I am new to python, and I am wondering if this approach is ideal, thoughI cant see how SQL would be any easier, other than to create tables for each individual employee (easy) and then run analysis on that (hard)
My goal is to be able to seperate 1-day long periods from 10+ day periods. Bonus points for this spanning over weekends.
Person Date Result
A 02/04/2012 5
B 02/04/2012 2
A 03/04/2012 5
B 03/04/2012 2
A 04/04/2012 5
A 05/04/2012 5
A 06/04/2012 5
B 25/04/2012 1
A 25/04/2012 2
A 26/04/2012 2
B 30/04/2012 1