I have a csv file that has student_id,guardian_email,guardian_first_name,guardian_last_name
In many cases, the student has a mom and dad with info, so the student has more than one row in the csv file.
For example the original csv would look like this:
student_id,guardian_email,guardian_first_name,guardian_last_name
12345,momemail@google.com,Jane,Doe
12345,dademail@google.com,John,Doe
98765,coollady@yahoo.com,Mary,Poppins
99999,soccermom@bing.net,Laura,Croft
99999,blackbelt@karate.com,Chuck,Norris
using python, I want it to output this:
student_id,guardian_email,guardian_first_name,guardian_last_name,guardian_email2,guardian_first_name2,guardian_last_name2
12345,momemail@google.com,Jane,Doe,dademail@google.com,John,Doe
98765,coollady@yahoo.com,Mary,Poppins,,,
99999,soccermom@bing.net,Laura,Croft,blackbelt@karate.com,Chuck,Norris
Any help is greatly appreciated!