Good evening, I'm pretty new to python and I'm stuck on a small project I have going on.
I'm using pandas to handle database information that is going to be sent via email, I have two tables, one that has employee schedules and another one that has the supervisors name and their email address. The purpose of this is to send each supervisor their team schedules. This is what the dataframes look like:
EmpId Email A.H.Chavez9869 hchavez@x.com A.M.Guerrero9404 mguerrero@x.com A.R.Heredia9173 aheredia@x.com A.B.Alvarez3585 balvarez@x.com A.B.Valdivia3584 bvaldivia@x.com ... ... J.Gutierrez13747 jgutierrez@x.com V.Santiago13756 vsantiago@x.com K.DeLeon13835 kdeleon@x.com N.ESTRADA13942 nestrada@x.com E.IBARRA13972 eibarra@x.com [89 rows x 1 columns]
Campaign LOB Title Date Event StartAt EndAt ReportsTo
EmpId
A.J.RAMIREZ3458 IP IP Agent 2021-09-17 Shift 11:00:00 19:30:00 A.X.Abarca9756
A.J.RAMIREZ3458 IP IP Agent 2021-09-17 Break 12:30:00 12:40:00 A.X.Abarca9756
A.J.RAMIREZ3458 IP IP Agent 2021-09-17 Lunch 14:30:00 15:00:00 A.X.Abarca9756
A.J.RAMIREZ3458 IP IP Agent 2021-09-17 Break 17:30:00 17:40:00 A.X.Abarca9756
A.A.Avila3688 ACR ACR Agent 2021-09-17 Shift 7:30:00 17:30:00 A.Elizondo3022
What I want to do is look up the "EmpID" values from the first table in the "ReportsTo" column from the second one, and send the results to the email address that corresponds to the "EmpID" on the first table.
I can't seem to get passed this, hope you can help me.