I have a dataframe with rather unintuitive structure:
device1 device2 column_name
1 1 date
111 211 param1
112 212 param2
2 2 date
121 221 param1
122 222 param2
3 3 date
131 231 param1
132 232 param2
I'm having hard time trying to convert it into the desired dataframe:
date param1 param2
device1 1 111 112
2 121 122
3 131 132
device2 1 211 212
2 221 222
3 231 232
Playing with pivot, stack/unstack allowed me to get closer but never reach the goal.
How can I do that?