I need help with pivoting my df to get the start and end day.
Id  Day   Value
111 6     a
111 5     a
111 4     a 
111 2     a
111 1     a
222 3     a
222 2     a
222 1     a
333 1     a
The desired result would be:
Id  StartDay  EndDay
111 4         6
111 1         2       (since 111 skips day 3)
222 1         3
333 1         1
Thanks a bunch!
 
    