Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Concatenation | Joining Data
Data Manipulation using pandas

Concatenation

Great! You've learned different ways of joining columns. Can we join two dataframes by rows? Surely, we can.

To join two dataframe, use the .concat() method of pandas, passing list of dataframes you want to join as the parameter. To perform this operation, both dataframes must have the same column names. Let's use splitted into two parts one of the dataframes used before and perform rows joining.

Note that .concat() is method of pandas, unlike the .merge() method. So you need to use pd.concat().

Concatenation

Everything was clear?

Section 5. Chapter 6
course content

Course Content

Data Manipulation using pandas

Concatenation

Great! You've learned different ways of joining columns. Can we join two dataframes by rows? Surely, we can.

To join two dataframe, use the .concat() method of pandas, passing list of dataframes you want to join as the parameter. To perform this operation, both dataframes must have the same column names. Let's use splitted into two parts one of the dataframes used before and perform rows joining.

Note that .concat() is method of pandas, unlike the .merge() method. So you need to use pd.concat().

Concatenation

Everything was clear?

Section 5. Chapter 6
some-alt