merge columns on row pandas code example
Example 1: merge on row number python
pd.concat([T1,T2],axis=1)
Example 2: take union of two dataframes pandas
m = {'left_only': 'df1', 'right_only': 'df2', 'both': 'df1, df2'}
result = df1.merge(df2, on=['A'], how='outer', indicator='B')
result['B'] = result['B'].map(m)
result