My Pandas dataframe looks like this:
Notice that for each task there are exactly 2 rows: row for begin and and row for end of task.
I need to create another dataframe with columns Task, StartTime, EndTime where each row will represent task and it's lifetime.
There is an ugly way to do it (using iteration). Is there an elegant way?