I have a large csv data file, sample of the data as below.
name year value
China 1997 481970
Japan 1997 8491480
Germany 1997 4678022
China 1998 589759
Japan 1998 7912546
Germany 1998 5426582
After several attempts with no success, I would like to interpolate my data to monthly, and then change the format of data to be as in the example below,
date China Japan Germany
1997-01-31 40164.17 707623.33 389835.17
1997-02-28 80328.33 1415246.67 779670.33
1997-03-30 1204925 2122870 1169505.50
1997-04-30 160656.67 2830493.33 1559340.67
1997-05-31 200820.83 3538116.67 1949175.83
. . . .
. . . .
. . . .
1997-12-31 481970 8491480 4678022
1998-01-31 49146.58 659378.83 452215.17
1998-02-28 98293.17 1318757.67 904430.33
1998-03-30 147439.75 1978136.5 1356645.5
1998-04-30 196586.33 2637515.33 1808860.67
1998-05-31 245732.97 3296894.17 2261075.83
. . . .
. . . .
. . . .
1998-12-31 589759 7912546 5426582
someone suggested this How to pivot a dataframe though it proved hard for me to reach the desired results. Maybe I'm not that good in python.
I would like to do it in R. Thoughts?