I need to drop all duplicates using Pandas, except for the ones where the cell contains a certain string.
Given that DF is:
NAME ID
Joe 110
Joe 123
Joe PENDING
Mary PENDING
Mary 110
Justin 123
I need to keep rows where 'ID' is PENDING, and at the same time drop the rest of the duplicates.
Desired output looks like this:
NAME ID
Joe 110
Joe 123
Joe PENDING
Mary PENDING