I have a df1 which looks like this
Company SKU Sales
1 A X1 10
2 B Y1 20
3 C X1 30
4 D Y1 40
5 E X2 50
6 F Y2 60
I have another df2 which only the list of SKU
SKU
1 X1
2 Y1
I want to merge these 2 dfs into another dataframe and the resulting dataframe should have the SKUs in the df2
Company SKU Sales
1 A X1 10
2 B Y1 20
3 C X1 30
4 D Y1 40
I tried Left join but it doesn't seem to be working
df3 = df1.merge(df2,how='Left',on='SKU')
I will appreciate your kind help.