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,[email protected],Jane,Doe
12345,[email protected],John,Doe
98765,[email protected],Mary,Poppins
99999,[email protected],Laura,Croft
99999,[email protected],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,[email protected],Jane,Doe,[email protected],John,Doe
98765,[email protected],Mary,Poppins,,,
99999,[email protected],Laura,Croft,[email protected],Chuck,Norris
Any help is greatly appreciated!