I have got data in the following format
Date | Store_Id | Data |
---|---|---|
08-10-2020 | 1 | {"Product_1":{"Size_1":2},"Product_2":{"Size_3":2,"Size_4":10}} |
08-10-2020 | 2 | {"Product_3":{"Size_2":2}} |
09-10-2020 | 1 | {"Product_1":{"Size_1":2},"Product_3":{"Size_1":2,"Size_2":4,"Size_3":5}} |
09-10-2020 | 3 | {"Product_5":{"Size_1":2},"Product_3":{"Size_3":2,"Size_4":10}} |
and want the output such there is a separate column for products, another for their size and one for the quantity at Date - Store_Id level similar to the table shown below:
Date | Store_Id | Product | Size | Quantity |
---|---|---|---|---|
08-10-2020 | 1 | Product_1 | Size_1 | 2 |
08-10-2020 | 1 | Product_2 | Size_3 | 2 |
08-10-2020 | 1 | Product_2 | Size_4 | 10 |
08-10-2020 | 2 | Product_3 | Size_2 | 2 |
09-10-2020 | 1 | Product_1 | Size_1 | 2 |
09-10-2020 | 1 | Product_3 | Size_1 | 2 |
09-10-2020 | 1 | Product_3 | Size_2 | 4 |
09-10-2020 | 1 | Product_3 | Size_3 | 5 |
09-10-2020 | 3 | Product_5 | Size_1 | 2 |
09-10-2020 | 3 | Product_3 | Size_3 | 2 |
09-10-2020 | 3 | Product_3 | Size_4 | 10 |
Is there any way to do the above using python?