I would like to have an index for countries. But I have two columns of country names. One column is for the origin of the FDI and the other one is for the destination of the FDI.
| origin | destination | FDI |
|---|---|---|
| US | UK | 120 |
| ITA | US | 90 |
| TR | SPA | 40 |
This is the other data set I will use.
| Country | Index |
|---|---|
| ITA | 0 |
| UK | 1 |
| TR | 0 |
| SPA | 1 |
Should I merge the latest data set two times with the first one changing the key for each time. Or there is a better way of doing that?