With a dataframe like this:
date user sales_blue sales_red
2019/06/01 A 30 50
2019/06/01 B 60 70
2019/06/02 A 25 35
2019/06/02 B 42 52
I'm trying to get to the following:
date user color sales
2019/06/01 A blue 30
2019/06/01 A red 50
2019/06/01 B blue 60
2019/06/01 B red 70
2019/06/02 A blue 25
2019/06/02 A red 35
2019/06/02 B blue 42
2019/06/02 B red 52
This is fairly doable in a kind of "manual" way by using loops, but for performance reasons I'd be looking for a more efficient solution which doesn't involve looping in Python.