我想优化迭代,因为完成操作需要很长时间,这是我的代码
the second table
l=0
for i in df_MailBox_Total.index :
if pd.isnull(df_MailBox_Total.at[i,'ReceivedOrgId']):
for j in df_SentMail_Service.index :
if df_MailBox_Total.at[i,'MailId'] == df_SentMail_Service.at[j,'MailID']:
df_MailBox_Total.at[i,'ReceivedOrgId'] =df_SentMail_Service.at[j,'OrgID']
l=l+1
break;
升
1条答案
按热度按时间nnsrf1az1#
IIUC,使用这个: