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  abcd@abcd.com
efgh    687678  efgh@efgh.com
ijkl    7878678 ijkl@ijkl.com
mnop    678687  mnop@mnop.com
qrst    6876    qrst@qrst.com

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