I have a dataset:
ID Action Converted
567 Email True
567 Text True
567 Phone call True
432 Phone call False
432 Social Media False
432 Text False
and i want the final table to look like
ID Email Text PhoneCall SocialMedia Converted
567 1 1 1 0 True
432 0 1 1 1 False
this is a small sample. I have 300+ unique actions so manually typing them out is not an option. Basically want to convert these categorical variables in multiple rows into a single row with the actions showing up as dummy variables.