I have a DataFrame where 'B' is a Category and 'Boy ' is an Event , For Boy{1,2,3,4} B = 1 is alloted ;Boy = 1 uses B for 10 Mins Start from 12:00 to End = 12:10 ,Next boy should be using it from End\_Time[0] , Like that for B =1 there are four Samples and B = 2 Different 4 Samples 

Input Sample :

```
B   Boy Start   End     Out
1   1   12:00   12:10   0:10
1   2   12:01   12:11   0:10
1   3   12:02   12:12   0:10
1   4   12:03   12:13   0:10
2   5   12:00   12:10   0:05
2   6   12:01   12:11   0:05
2   7   12:02   12:12   0:05
2   8   12:03   12:13   0:05
3   9   12:00   12:10   0:03
3   10  12:01   12:11   0:03
3   11  12:02   12:12   0:03
3   12  12:03   12:13   0:03

```

Code Tried :

```
data_1['End'] = pd.to_datetime(data_1['Start'] + pd.to_timedelta(data_1['Out'])
for i in range(1, len(data_1)):
    data_1.loc[i, 'Start'] = data_1.loc[i-1, 'End'] 

```

Output :

```
B   Boy Start   End     Out
1   1   12:00   12:10   0:10
1   2   12:10   12:20   0:10
1   3   12:20   12:30   0:10
1   4   12:30   12:40   0:10
2   5   12:40   12:45   0:05
2   6   12:45   12:50   0:05
2   7   12:50   12:55   0:05
2   8   12:55   13:00   0:05
3   9   13:00   13:03   0:03
3   10  13:03   13:06   0:03
3   11  13:06   13:09   0:03
3   12  13:09   13:12   0:03

```

Code Failed :

```
new_Start_time = []
for i,item in data_1.groupby('B'):
    temp_list = [item.iloc[0,2]]
    list_all  = [item.iloc[0,3]]
    for j in range(len(list_all)):
        temp_list[j+1] = [list_all[j] for i in range(len(list_all) - 1) ]
        temp_list.append(temp_list[j])
    new_Start_time.extend(temp_list)
data_1['new_Start_time'] = new_Start_time   

```

Error : IndexError: list assignment index out of range 

Expected Result :

```
B   Boy Start   End     Out
1   1   12:00   12:10   0:10
1   2   12:10   12:20   0:10
1   3   12:20   12:30   0:10
1   4   12:30   12:40   0:10
2   5   12:00   12:05   0:05
2   6   12:05   12:10   0:05
2   7   12:10   12:15   0:05
2   8   12:15   12:20   0:05
3   9   12:00   12:03   0:03
3   10  12:03   12:06   0:03
3   11  12:06   12:09   0:03
3   12  12:09   12:12   0:03

```

Thanks In Advance