I have two dataframes wi,
Site_ID Town
1235 Fitzroy
2344 Glen Iris
another with site_id and business name.
Site_ID Business Name
1235 BAC
2344 RFG
I would like to have only matched records upon joining two df's like this. After performing below merge function,
merge_df_rf1 = pd.merge(df1.drop_duplicates(), df2, on='site_id' ,how='inner')
I am getting this output.
Site_ID Business Name Town
1235 BAC Fitzroy
1235 BAC Fitzroy
2354 RFG Glen Iris
2354 RFG Glen Iris
Not sure where I am going wrong with my join statement.
Any help on this will be highly appreciated.
Thank you in advance for the support!