I've searching but haven't find the answer. I have the next dataframe
                       Pais  Anio Electricidad Electricidad Electricidad Electricidad Electricidad Electricidad Electricidad Electricidad Electricidad Electricidad Electricidad
0                    NaN   NaN           No           No           No           No           No           Si           Si           Si           Si           Si        Total
1                    NaN   NaN        Rural        Rural       Urbana       Urbana     Total No        Rural        Rural       Urbana       Urbana     Total Si     Total Si
2                    NaN   NaN       Hombre        Mujer       Hombre        Mujer          NaN       Hombre        Mujer       Hombre        Mujer          NaN          NaN
3              Argentina  2015          NaN          NaN          NaN          NaN          NaN          NaN          NaN          NaN          NaN          NaN          NaN
4                Bolivia  2014       513160       462745        24457        25959      1026321      1187340      1243921      3554853      3686894      9673008     10699329
5                 Brasil  2015       287373       216447        28718        15895       548433     15898153     14545231     81355185     88432517    200231086    200779519
6                  Chile  2011        20192        16702         8752         7090        52736      1054604      1053353      6936960      7749581     16794498     16847234
And this is the desired output:
I put the desired output in an image because it was a lot of data, i managed to get only one melt, but I need to also "melt" the Yes/No, Zone and Gender Rows...
my code is this:
df1 = df.iloc[0:3] # select three first rows
df1 = df1.ffill(axis='columns') #Rellenando los grupos 
df = df.iloc[3:]
# my_dataframe = my_dataframe[my_dataframe.employee_name != 'chad']
df1 = df1.append(df) 
# moviendo primera fila a titulo de columna
df1.columns = df1.iloc[0]
df1 = df1.reindex(df1.index.drop(0)).reset_index(drop=True)
df1.columns.name = None
df1 = pd.melt(df1, id_vars=["Pais", "Anio"], var_name="Pregunta")
Suggestions and advice on this is appreciated!!!

                        
Instead your solution is possible use: