Hi there,
I've got a dataset for FDI from UNCTAD (link attached) which is formatted as a table with year on columns and countrys on rows. I would like to convert this to a dataset formatted as three variables -COUNTRY YEAR FDI-. Is there a way to do this easily?
Thanks!
To give examples,
The original is
and I would like it to be formatted as
I've got a dataset for FDI from UNCTAD (link attached) which is formatted as a table with year on columns and countrys on rows. I would like to convert this to a dataset formatted as three variables -COUNTRY YEAR FDI-. Is there a way to do this easily?
Thanks!
To give examples,
The original is
Code:
1970 1971 1972 AFG X1 X2 X3 ALB X1 X2 X3 ALG X1 X2 X3
Code:
COUNTRY YEAR FDI AFG 1970 X1 AFG 1971 X2 AFG 1972 X3 ALB 1970 X1
Comment