I have a dataframe like:
    x1    y1    x2    y2
0  149  2653  2152  2656
1  149  2465  2152  2468
2  149  1403  2152  1406
3  149  1215  2152  1218
4  170  2692  2170  2695
5  170  2475  2170  2478
6  170  1413  2170  1416
7  170  1285  2170  1288
I need to pair by each two rows from data frame index. i.e., [0,1], [2,3], [4,5], [6,7] etc.,
and extract x1,y1 from first row of the pair x2,y2 from second row of the pair, similarly for each pair of rows.
Sample Output:
[[149,2653,2152,2468],[149,1403,2152,1218],[170,2692,2170,2478],[170,1413,2170,1288]]
Please feel free to ask if it's not clear.
So far I tried grouping by pairs, and tried shift operation. But I didn't manage to make make pair records.
 
     
     
    