I am working with the following data from FWI in pandas
I want to transform it to following form for each country
I have tried using the melt, stack, and pivot function but have not been able to achieve desired result with these multi line headers. Link for the dataset: https://freedomhouse.org/sites/default/files/2021-02/Country_and_Territory_Ratings_and_Statuses_FIW1973-2021.xlsx Can anyone help please?