melt
in Pandas.product id
column, as well as one column per month for a fiscal year: Jan
, Feb
, etc. The first row in the Jan
column contains the quantity of the first product sold in Jan
, the second row contains the quantity of the second product sold in Jan
, etc.Dataframes > Unpivot Dataframe
. Then, configure your ID Variables
. These columns will be present in the unpivoted dataframe. In our example, you would select the product_id
column.Values
. Each column header will go in the variables column, and the column values will go in the values column. In our example, you would select all the month columns.