empty = pd.DataFrame(columns=["x"])
df1 = pd.DataFrame({"x":[1],"a":[3]})
df2 = pd.DataFrame({"x":[1],"b":[6]})
I'd like to merge the df1 with empty.
x a
0 1 3
I tried
empty.merge(df1, on=["x"])
but this returns an empty data frame. After successfully merging with df1, I'd like to be able to merge empty again with df2 so that it results in
x a b
0 1 3 6