In order to merge two dataframes you can use this two examples. Both returns the same goal.
Using merge plus additional arguments instructing it to use the indexes
Try this:
response = pandas.merge(df1, df2, left_index=True, right_index=True)
In [2]: response
Out[2]:
b c
0 1 1
1 2 2
2 3 3
Or you can use join. In case your daraframes are differently-indexed.
DataFrame.join is a convenient method for combining the columns of two potentially differently-indexed DataFrames into a single result DataFrame.
Here is a basic example:
result = df1.join(df2)
In [3]: result
Out[3]:
b c
0 1 1
1 2 2
2 3 3
athe index?