for i in range(len(df)): if(df.loc[i,"ALT_EMAIL_ADDR.1"] in(emails)): df.loc[i,"LOGGED.1"]=logins.iloc[int(emails.index(df.loc[i,"ALT_EMAIL_ADDR.1&q