mardi 3 août 2021

Conditional to Check First and Last Name in Loop

I have this code to check if either email, phone, or street address are the same. Now, I need to add something before it to ensure the first and last names are also the same. Any ideas on how to do this?

enter image description here Blockquote

df = pd.read_csv("up_to_4_clean.csv",dtype='str')
def partial_match(key1, key2):

 for f1, f2 in zip(key1, key2):
    if f1 == f2:
        return True
 return False

#Testing
print(partial_match((df['Email'].iloc[41403],df['Street Address'].iloc[41403]), 
(df['Email'].iloc[207303],df['Street Address'].iloc[207303])))

Aucun commentaire:

Enregistrer un commentaire