python combine side by side dataframes

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

Here is what the above code is Doing:
1. We’re creating two DataFrames, df1 and df2.
2. We’re concatenating them along the columns (axis=1) and assigning the result to df.
3. We’re printing the first five rows of df.

Note that the index values of the two DataFrames are preserved.