this is my code to iterate two tables simultanous
for i in df_MailBox_SentService.index :
val_s = df_MailBox_SentService.at[i,'MailId']
for j in df_TBL_SentMail.index :
if val_s == df_TBL_SentMail.at[j,'ID']:
df_MailBox_SentService.at[i,'UnifiedMailNumber']=df_TBL_SentMail.at[j,'MailNbr']
idf_MailBox_SentService.at[i,'UnifiedMailNumber']but then you have an inner loop that will keep overwriting on that position every time the conditional is triggered (sincejis not used to determine the position to write to). The loops don't make much sense to me, unless the conditional is guaranteed to trigger only once, in that case you should break the inner loop to improve performance