Jan-20-2019, 03:43 AM
That worked. Thanks.
Strange, because the original code example I was basing it on indicated that the join fields were implicit from the original dfs as they would be in SQL, and would not have to be explicitly listed in the function.
Strange, because the original code example I was basing it on indicated that the join fields were implicit from the original dfs as they would be in SQL, and would not have to be explicitly listed in the function.
df_merged = pd.merge(df_hown[['dt', 'hown_rt']], df_vcy[['dt', 'vcy_rt']], on=['dt','dt']) df_merged.head() Out[140]: dt hown_rt vcy_rt 0 1980-01-01 65.5 5.2 1 1980-04-01 65.6 5.6 2 1980-07-01 65.6 5.7 3 1980-10-01 65.6 5.0 4 1981-01-01 65.6 5.2