Given the following data frame:
pd.DataFrame({"A":[1,2,3],"B":[4,5,6],"C":[6,7,8]})
A B C
0 1 4 6
1 2 5 7
2 3 6 8
3 11 14 16
4 12 15 17
5 13 16 18
I would like to reshape it so it would look like so:
A B C A_1 B_1 C_1 A_2 B_2 C_2
0 1 4 6 2 5 7 3 6 8
1 11 14 16 12 15 17 13 16 18
So every 3 rows are grouped into 1 row
How can I achieve this with pandas?