0

I have this pivot table that tells me the status of things, lets call them "requests". there are 8 different types of requests out there, with a different status for the hundreds of requests. So, my pivot table consists of 8 different types of requests, and then a count of the status for each type of request from df1.

Ex:

Requests New Closed In Progress Total
request 1 2 3 2 7
request 2 4 0 1 5
total 6 3 3 12

In df2 (which is not the pivot table or the initial df that i created the pivot table from) I have the list of all overdue requests. This has a due date column in this data. So, multiple rows of request 1, request 2, and request 3, etc. I am trying to add a % of overdue next to the column "Total" in the pivot table. any ideas on how to do this?

Andre Wildberg
  • 12,344
  • 3
  • 12
  • 29
  • You will need to compute the percentage overdue in `df2` and the join it to `df1`. This is essentially 2 FAQs, first [How to calculate mean by group?](https://stackoverflow.com/q/11562656/903061) and then [How to merge/join data frames](https://stackoverflow.com/q/1299871/903061). If you need more help than those pointers, please provide a relevant sample of `df2` so we can demonstrate a solution. – Gregor Thomas Mar 07 '23 at 19:57

0 Answers0