# Stack the DataFrames on top of each other
vertical_stack = pd.concat([survey_sub, survey_sub_last10], axis=0)
# Place the DataFrames side by side
horizontal_stack = pd.concat([survey_sub, survey_sub_last10], axis=1)
# Merging 3 or more dataframes base on a common column
import pandas as pd
from functools import reduce
#Create a list of df to combine
list_of_df = [df_1,df_2,df_3]
#merge them together
df_combined = reduce(lambda left,right: pd.merge(left,right,on='common column'), list_of_df)
put two columns together in one column in pandas dataframe
# First dataframe with three columns
dlist=["vx","vy","vz"]
df=pd.DataFrame(columns=dlist)
df["vx"]=df1["v2x"]
df["vy"]=df1["v2y"]
df["vz"]=df1["v2z"]
# second dataframe with three columns
dlist=["vx","vy","vz"]
df0=pd.DataFrame(columns=dlist)
df0["vx"]=df2["v1x"]
df0["vy"]=df2["v1y"]
df0["vz"]=df2["v1z"]
# Here with concat we can create new dataframe with garther both in one
# YOU CAN PUT SOME VALUES IN EACH AND CHECK IT
# WHAT INSIDE THE CONCAT MUST BE A LIST OF DATAFRAME
v = pd.concat([df,df0])