I'm working on this dataset:
# dummy data
import pandas as pd
data = pd.DataFrame({None : ['Company', 'AAA', 'BBB', 'CCC','Company', 'AAA' ],
None : ['Copper', 'Copper', 'Iron', 'Iron', 'Gold', 'Gold'],
"NaN" : ['Net','Gross', 'Net','Gross', 'Net','Gross' ],
"11/01/2021" : [1,2,3,4,5,6],
"12/01/2021" : [10,11,12,13,14,15],
"13/01/2021" : [19,20,21,22,23,25]})
data
And I'm trying to get this output:
I tried with stack/melt but I wasn't able to get the data in this format.
Thanks