I have a old data frame like:
Name Courses Attendence Day
Mike Math 1 Monday
Mike Math 1 Tuesday
Mike Physcis 2 Monday
Mike Chemisty 1 Monday
John Math 2 Tuesday
John Physics 1 Tuesday
John Physics 1 Tursday
And want to create a new dataframe:
Name Math Physics Chemisry
Mike 2 2 1
John 2 2 0
Is there any efficient way to do it?
Thanks!