Joins: Part 2

In my previous blog, we discussed inner and outer joins. For this blog, I would like to briefly explain left and right joins. Let’s take two DataFrames again:

df1

df2

To perform a left join on these two DataFrames, you would need to execute the following code:

The result looks like this:

Unfortunately you do lose your index in the process, so you will have to reset that later.