I would like to concatenate 2 pandas DataFrames, each with time series indexes that may overlap, but also with column keys that may overlap.
For example:
old_close new_close
1TM ABL ... ABL ANG ...
Date Date
2009-06-05 100 564 1990-06-08 120 2533
2009-06-04 102 585 1990-06-05 121 2531
2009-06-03 101 532 1990-06-04 123 2520
2009-06-02 99 540 1990-06-03 122 2519
2009-06-01 99 542 1990-06-02 121 2521
...
I want to merge old_close and new_close to form a new DataFrame that includes all the data in both the DataFrames but excludes all duplicate values on both indices.
So far I do this:
merged_close = pd.concat([old_close, new_close], axis=1)
but this results in duplicate columns (rows when along axis 0) and a MultiIndex.