pandas

In pandas, you can use the following command: 

    pd.merge(df1,df2,on='key')

The following is the output to the preceding commands: 

Output of the inner join of the two DataFrames

As expected of an inner join, only the key values present in both the tables appear in the merged dataset.

Suppose we want to implement a left join between the two. This can be done in the two tools as shown here:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.42.240