I have student dataset similar to this:
ID GENDER AGE ACADEMIC_STANDING
1 M 20 Good
2 F 21 Probation 1
4 M 19 Probation 1
2 F 21 Probation 2
2 F 21 Dismissal
4 M 19 Probation 2
1 M 20 Good
As you can see, we have a student repeating (often more than 30 times) in other rows due to different semesters and courses. I want to ultimately have 1 single row for each student with additional columns based on the ACADEMIC_STANDING column. There will be 3 new columns: If a student has good standing, the good column will be true, others false. If a student has Prob 1 and Prob 2, Prob12 column will be true. Finally, if a student has all Prob 1, Prob 2 and Dismissal, then the Dismissed column will be true.
Expected Output:
ID GENDER AGE Good Prob12 Dismissed
1 M 20 True False False
2 F 21 False False True
4 M 19 False True False