N = 1000
df1 = pd.DataFrame([1, 2, 3] * N, columns=['col'], index=['a', 'b', 'c'] * N)
df2 = pd.DataFrame([4, 5, 6] * N, columns=['col'], index=['b', 'c', 'd'] * N)
Merge DataFrames in Pandas using the mean