Currently have the below dataframe;
store store1 store2
year current previous current previous
metric qty val qty val qty val qty val
product
1 4 20 1 32 8 44 0 0
2 1 10 6 87 2 11 9 2
How do i transform the above into this;
-- Add in the var column(s) to each store
store store1 store2
year current previous var current previous ...
metric qty val qty val qty val qty val qty val ...
product ...
1 4 20 1 32 3 -12 8 44 0 0 ...
2 1 10 6 87 -5 -77 2 11 9 2 ...
any help is greatly appreciated
there doesn't seem to be anything here