I have such a dataframe:
On the variables column, there are 5 variables, namely Electric power consumption, Literacy rate, Logistics, Health, and Taxes. I would like to create a column for each variable. Their values should come from the value column. In the end, the dataframe should look like below:
cname | year | electric_consumption | literacy rate | logistics | health | taxes
afghanistan | 1960 | 564 | 73 | 64 | 363 | 563
afghanistan | 1961 | 256 | 45 | 64 | 465 | 546
afghanistan | 1962 | ### | ## | ## | ### | ###
. . . . . . .
. . . . . . .
. . . . . . .
zimbabwe | 2010 | ### | ## | ## | ### | ###