The default type of join performed by pd.merge() is an inner join. To use another join method, specify the join type using the how parameter of the pd.merge() function (or the .merge() method). The valid options are:
- inner: This is the intersection of keys from both DataFrame objects
- outer: This is the union of keys from both DataFrame objects
- left: This only uses keys from the left DataFrame
- right: This only uses keys from the right DataFrame
As we have seen, an inner join is the default and it returns a merge of the data from both DataFrame objects only where the values match.
An outer join, in contrast, returns both the merge of the matched rows and the unmatched values from both the ...