I am a beginner with Julia and am struggling to merge two dataframes I have of various length. This is one of the dataframes, then I have another that is 5120 long, in interest of space I have only included the first 20, but the second dataframe contains all the years the first dataframe has. I want to add G as a column to my second dataframe so that, every row with year=1965 has G=1.08906 and so on for each year. Any suggestions how I might do this - I apologize if there is an easy fix.
Row β year G
β Float64 Float64
ββββββΌββββββββββββββββββ
1 β 1965.0 1.08906
2 β 1966.0 1.10632
3 β 1967.0 1.09697
4 β 1968.0 1.09504
5 β 1970.0 1.12902
6 β 1971.0 1.13436
7 β 1972.0 1.14328
8 β 1973.0 1.14644
9 β 1975.0 1.14837
10 β 1976.0 1.14905
11 β 1977.0 1.15022
12 β 1978.0 1.15693
13 β 1979.0 1.16652
14 β 1980.0 1.17443
15 β 1981.0 1.1808
16 β 1983.0 1.17581
17 β 1984.0 1.18052
5120Γ3 DataFrame
Row β year id s
β Int64 Int64 Float64
βββββββΌββββββββββββββββββββββββββββ
1 β 1965 100751 0.000706819
2 β 1965 104151 0.000943925
3 β 1965 104179 0.000898235
4 β 1965 105330 0.000309796
5 β 1965 110097 6.78435e-5
6 β 1965 110404 4.6729e-5
7 β 1965 110635 0.00147144
8 β 1965 110644 0.000311526
9 β 1965 110653 3.46141e-6
10 β 1965 110662 0.00114019
11 β 1965 110671 0.000150917
12 β 1965 110699 5.57286e-5
13 β 1965 110705 0.000406715
14 β 1965 117636 4.77674e-5
15 β 1965 122612 0.000192108
16 β 1965 123961 0.00063586
17 β 1965 124885 7.85739e-5
18 β 1965 126775 6.47283e-5
19 β 1965 126818 0.000563171
20 β 1965 127060 0.000426791
21 β 1965 127741 0.000514019