This article is part of a series of practical guides for using the Python data processing library pandas. To see view all the available parts, click here.
In this guide we will look at a few methods we can use to add pandas DataFrames together vertically, stacking them one on top of the other. This will include two pandas methods concat
and append
, and a third way where we make use of some simple python methods. This last method can often be much faster than working with DataFrames directly, especially if we want to repeatedly append one row at a time to a DataFrame.
If you are looking at joining tables, or adding two tables together horizontally, try the guide on joining tables.
Continue reading