How to add computed columns in a multi-level column dataframe
How to add computed columns in a multi-level column dataframe Question: I have a multi-level column dataframe on the lines of one below: How can I add columns ‘Sales’ = ‘Qty’ * ‘Price’ one each for each ‘Year’? The input dataframe in dictionary format: {(‘Qty’, 2001): [50, 50], (‘Qty’, 2002): [100, 10], (‘Qty’, 2003): [200, …