Pandas > Left/right dataframes merge

Name
Code
Output
dataframe1 = pandas.DataFrame(numpy.random.randint(0,4,size=(3, 2)), columns=['C1','C2'])
dataframe2 = pandas.DataFrame(numpy.random.randint(0,4,size=(3, 2)), columns=['C1','C2'])
print ("dataframe1")
print (dataframe1)
print ("dataframe2")
print (dataframe2)
dataframe3 = pandas.merge(dataframe1, dataframe2, on='C1', how='left')
print ("left merged dataframes")
print (dataframe3)
dataframe4 = pandas.merge(dataframe1, dataframe2, on='C1', how='right')
print ("right merged dataframes")
print (dataframe4)
dataframe1
   C1  C2
0   0   3
1   0   0
2   1   3
dataframe2
   C1  C2
0   2   3
1   0   3
2   3   1
left merged dataframes
   C1  C2_x  C2_y
0   0     3   3.0
1   0     0   3.0
2   1     3   NaN
right merged dataframes
   C1  C2_x  C2_y
0   0   3.0     3
1   0   0.0     3
2   2   NaN     3
3   3   NaN     1