0

I've two pandas dataframe having one common column in both but they are not having same values. Wish to get the missing values to another dataframe common column.

df1

name    mobile  email
abcd    992293  [email protected]
efgh    687678  [email protected]
ijkl    7878678 [email protected]
mnop    678687  [email protected]
qrst    6876    [email protected]

df2

name    age
abcd    22
efgh    12
Expected output

name    age
abcd    22
efgh    12
ijkl
mnop
qrst
BARUN
  • 139
  • 12

1 Answers1

1

This is a simple case of joining two data frames on a common key:

pd.merge(df1, df2, on='name',how='left')
sau
  • 1,316
  • 4
  • 16
  • 37