How to merge two dataframes side-by-side?

You can use the concat function for this (axis=1 is to concatenate as columns):

pd.concat([df1, df2], axis=1)

See the pandas docs on merging/concatenating: http://pandas.pydata.org/pandas-docs/stable/merging.html

Leave a Comment