If I understand your question correctly I would suggest a stack and a merge:
In my code there is still some uglyness going on with dropping and renaming of some columns, but if you take a closer look at the functions you might be able to clean it up a little.
df1 = pd.DataFrame(
{
"A": ["A0", "A1", "A2", "A3"],
"B": ["B0", "B1", "B2", "B3"],
"C": ["C0", "C1", "C2", "C3"],
"D": ["D0", "D1", "D2", "D3"],
},
index=[0, 1, 2, 3])
df2 = pd.DataFrame(
{
"A": ["A4", "A5", "A6", "A7"],
"B": ["B4", "B5", "B6", "B7"],
"C": ["C4", "C5", "C6", "C7"],
"D": ["D4", "D5", "D6", "D7"],
},
index=[0, 1, 2, 3])
df1 = df1.stack().reset_index()
df2 = df2.stack().reset_index()
df3 = df1.merge(df2, how= "outer", on = ['level_0', 'level_1']).drop(columns=['level_0', 'level_1'])
df3.columns = ['date', 'value']
df3 = df3.set_index('date')
print(df3.head())
Will return:
value
date
A0 A4
B0 B4
C0 C4
D0 D4
A1 A5
Since I do not have your data I helped myself with very generic data input.