0
Df1

|S.No Name     Area         Locality       Mobile_No |
|----------------------------------------------------|
|1    Sam      Canacona     Agonda         9456789034|
|2    Rose     Margao       Kalva          7846789840|
|3    Harry    Valpoi       Arvalam        8945670024|
|4    Tina     Ponda        Bondla         9811109876|

 Df2

|Mobile_No     Mobile_Company|
|----------------------------|
|7896095431    Samsung       |
|9456789034    Redmi         |
|6789065486    iphone        |
|7846789840    oppo          |
|8945670024    vivo          |
|9875692341    Oneplus       |
|9811109876    HTC           |

What i want to do is to append Mobile_Company to dataframe one with matching column values of Mobile_No in df1 with Mobile_No in df2.

2 Answers2

0

You will want to use df1.merge

joined_df = Df1.merge(Df2, how='inner', on='Mobile_No')
Stefan
  • 1,697
  • 15
  • 31
Ali Zaini
  • 88
  • 5
0

Code:

pd.merge(Df1, Df2, how=’inner’, on='Mobile_No')
Aaj Kaal
  • 1,205
  • 1
  • 9
  • 8