i have a dataframe df1
Name ; id ; address
John Nicola,MD, doctor ; 45 ; 34,Street 78363 NEW YORK
Alfred Dubo,Prof ; 65 ; Street 76353,CANADA
and i have another dataframe df2
:
firstname ; lastname ; city ; id
John ; Nicola ; NEW YORK
i want to fill the id
field of df2
from df1
according to some condition :
if (
df2['fristname'] in df1['Name'] AND
df2['lastname'] in df1['Name'] AND
df2['city'] in df1['address']
):