I have two dataframes. The first one contains the data of different cities.
dfTmp:
City 2005 2007
0 London 3 7
1 Paris 2 0
then an empty dataframe that I want to populate
dfData:
City Year
0 London 2005
1 London 2007
2 Paris 2005
3 Paris 2007
I want to merge the two datasets. Then dfData should become as the following
dfData:
City Year Value
0 London 2005 3
1 London 2007 7
2 Paris 2005 2
3 Paris 2007 0