This question is different from other solved questions on stackoverflow.
Now I have a dataframe with two columns (the race column has five possible values such as white, black, asian, etc AND the attitude column has five possible values from strongly disagree to disagree) as shown below:
race distracted
white agree
white disagree
black agree
asian neutral
hisp agree
indian disagree
... ...
Now how can I change the dataframe into the following structure with five columns but row values in the related column of attitude now will be filled in each newly built columns:
white black asian hisp indian
agree disagree agree neutral disagree
agree disagree neutral agree disagree
... ... ... ... ...
The attached image is my raw data downloaded from kaggle.