Merge two pandas DataFrames

Tobias Krabel
8080 Labs
Published in
1 min readJan 16, 2020
Photo by Alex on Unsplash

pd.merge(left=df_left, right=df_right, how=’inner’, left_on=[‘df_left_key’], right_on=[‘df_right_key’])

In most cases, the following skeleton is enough for you to merge two DataFrames in pandas.

how can be one of “inner”, “outer”, “left”, or “right”

Here is an example

Tired of googling pandas commands?

With bamboolib, you don’t need to think about the pandas syntax anymore. bamboolib will guide you through the merge and write the code for you, so that you can focus on what you want to do instead of how you do it.

--

--

Tobias Krabel
8080 Labs

Co-creator of bamboolib.com. I am always looking for ways to create better tools for Python Data Scientists.