I have been trying to implement left outer join in python.I see that there is slight difference between left join and left outer join.
As in this link : LEFT JOIN vs. LEFT OUTER JOIN in SQL Server
I could get my hands on below with sample examples:
import pandas as pd
import numpy as np
df1 = pd.DataFrame({'key': ['A', 'B', 'C', 'D'],
'value1': np.random.randn(4)})
df2 = pd.DataFrame({'key': ['B', 'D', 'D', 'E'],
'value2': np.random.randn(4)})
df3 = df1.merge(df2, on=['key'], how='left')
This gives records from df1 in total (including the intersected ones)
But how do I do the left outer join which has only records from df1 which are not in df2?
Not: This is example only.I might have large number of columns (different) in either dataframes.
Please help.