Append multiple pandas data frames at once

user3664020 picture user3664020 · Apr 10, 2016 · Viewed 83.7k times · Source

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)

Let us say there are 5 pandas data frames t1, t2, t3, t4, t5. How do I append them at once? Something equivalent of

df = rbind(t1,t2,t3,t4,t5)

Answer

jezrael picture jezrael · Apr 10, 2016

I think you can use concat:

print pd.concat([t1, t2, t3, t4, t5])

Maybe you can ignore_index:

print pd.concat([t1, t2, t3, t4, t5], ignore_index=True)

More info in docs.