You have a csv export from an SIS that you want to import into another system. There are lots of duplicate accounts, people with the same first, last, and birthdays. You would like to merge the rows. You decided to do this by identifying any duplicates, and choosing the one with the most columns filled out as the winner. If any of the remaining rows have non-null values for columns where the winning row is null, coelesce them across ("merge" them).
But wait, the target system has the following additional requirements:
- You need to add a
role
column, based on the gender, 'M' = 'Father', etc - The export column names don't match, need to rename them