There might be former questions but they do not show up when you search for them. This question and its title is very informative.
import pandas as pd
df1 = pd.DataFrame({'lkey': ['foo', 'bar', 'baz'], 'x1': [1, 2, 3], 'x2': [11, 22, 33]})
df2 = pd.DataFrame({'rkey': ['foo', 'bar', 'bazz'], 'y1': [1, 2, 3], 'y2': [111, 222, 333]})
merged_df = pd.merge(df1, df2, how= 'inner', left_on=['lkey','x1'], right_on=['rkey','y1'])
merged_df
How to show which rows of df1 are not merged?
Listing unmerged rows of df1 with columns 'lkey' and 'x1' will be very helpful.
baz 3