1

Good day, comuntiy! I have faced especially challenging problem: I have a multiindex pivot table with multi-level columns in the following order: store_id_unique_fraction_by_date_product_id_lag_1...store_id_unique_fraction_by_date_product_id_lag_4, store_id_unique_fraction_by_date_product_id_lag, store_id: then the list of shops indexes follows, and then the list of product ids. The picture is subscribed also: [image of pivot table][1]

And I want to turn this pivot table into dataframe with the following indexes : date, product_id, store_id. While in columns I'd like to see tore_id_unique_fraction_by_date_product_id_lag_1...store_id_unique_fraction_by_date_product_id_lag_4 representing the values. How to get it?

Thank you in advance! [1]: https://i.stack.imgur.com/WEOyQ.png

  • please read [how to ask](https://stackoverflow.com/help/how-to-ask) and [how to ask for pandas](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) – mozway Feb 28 '22 at 15:47
  • Please provide enough code so others can better understand or reproduce the problem. – Community Feb 28 '22 at 19:52

0 Answers0