I have a project where I am going through a list of emails and making a change to a database. The issue is that I won't be able to do it all at once(i need to break this up into multiple runs). But I also don't want to overlap emails I already processed.
The emails are filled in from a CSV. I want to loop through each email and if the process was successful want to mark a column with "X". This way I can have my program make sure not to use emails with "x"s next to them. Then export it to the same file so I won't have to make any changes the next time I run.
I am having trouble with the logic though.
changes = ['a@mail.com', 'b@mail.com']
if data['emails'] in changes:
data = pd.read_csv('data.csv')
###process goes here and exports list of processed emails in changes
changes = ['a@mail.com', 'b@mail.com']
if data['emails'] in changes:
data['processed'] = "x"
data.to_csv('data.csv')
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…