Search⌘ K
AI Features

The Concat Function

Explore how to combine DataFrames with the concat function in Pandas. Learn to stack data frames vertically or horizontally, manage their indexes, handle unmatched columns, and control joins to shape your data effectively.

We'll cover the following...

Combining DataFrames

We sometimes need to collect data from different resources and combine them into a single DataFrame. How we approach this task depends on the characteristic of the data and the way it’s represented.

One option is to combine them by stacking them side-by-side or on top of each other. We can imagine building a brick wall. One wall is made up of multiple bricks placed side-by-side and on top of one another. The concat function can be used for this task. Let’s go over some examples to learn how this function is used. ...