cbind
pandas equivalent of R’s cbind (concatenate/stack vectors vertically)
test3 = pd.concat([test1, test2], axis=1) test3.columns = [‘a’,’b’] (But see the detailed answer by @feng-mai, below)
test3 = pd.concat([test1, test2], axis=1) test3.columns = [‘a’,’b’] (But see the detailed answer by @feng-mai, below)