I have the dataframe below:
station date A B C
NY 2019-1-1 0 1 4
NY 2019-1-2 3 9 3
WN 2019-1-1 3 7 6
WN 2019-1-2 0 1 2
How can I change it to the following format?
station METRIC 2019-1-1 2019-1-2
NY A 0 3
NY B 1 9
NY C 4 3
WN A 3 0
WN B 7 1
WN C 6 2
I am not sure whether I should use stack/unstack/melt/pivot/pivot_table...