In [6]:
import pandas as pd
left1 = pd.DataFrame({'A': ['A0', 'A1', 'A2'],
'B': ['B0', 'B1', 'B2']},
index=['K0', 'K1', 'K2'])
right1 = pd.DataFrame({'C': ['C0', 'C2', 'C3'],
'D': ['D0', 'D2', 'D3']},
index=['K0', 'K2', 'K3'])
In [12]:
left1
Out[12]:
In [8]:
right1
Out[8]:
In [13]:
left1.join(right1)
Out[13]:
In [14]:
right1.join(left1)
Out[14]:
In [11]:
left1.join(right1, how='outer')
Out[11]:
No comments:
Post a Comment