Append multiple pandas data frames at once

前端 未结 3 1203
我在风中等你
我在风中等你 2020-11-22 13:38

I am trying to find some way of appending multiple pandas data frames at once rather than appending them one by one using

df.append(df)

Le

3条回答
  •  -上瘾入骨i
    2020-11-22 14:00

    #Row wise appending

    combined_data = pd.concat([t1, t2, t3, t4, t5], axis=0)
    

    This will stack one dataframe over another

    #column wise appending

    combined_data = pd.concat([t1, t2, t3, t4, t5], axis=1)
    

    This will append the 2nd dataframe on the right side of the 1st dataframe

提交回复
热议问题