Python Forum
Match ref from 1 DF to another
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Match ref from 1 DF to another
#1
I have 2 df. 1 comes from the worksheet where a list of projects with a ref number, a date & the employees ID is entered. This in internally maintained. These projects get submitted to our vendor portal which sends us emails about the acceptability of said projects. It includes our ref number in emails. The other df is the email lists that I've been able to get in pd with the sender ID, the date sent, the body which contains our ref numbers along with the approval or rejection phrase.

I want to be able to search for each ref number from the first df within the body column of the second df and give me whether the body says the words, approved / rejected / under consideration.

I only need the status of these ref from the latest mail received, as there are multiple mails received that acknowledge the project being submitted, the project being under consideration etc., but I only need the status that is posted in the last email received. I then want to add the status in the first df against the ref numbers.

So far, I've been able to read the excel using pd and get the emails from outlook to the pd.df. But not sure how to construct a for loop for each ref.
Reply
#2
Post what you have so far.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020