I have two pandas dataframes one is an answer key which looks like this
0 1 2 3 4 5 6 7 8 9
0 TTTTKEY B C B A D A D D C
The other dataframe has answers from students which looks like this
0 1 2 3 4 5 6 7 8 9
0 182 C C C A D A D D C
1 184 C C B A D C A D C
I am wondering how I could change the values to 1's if the answers from students match the answer key and change the values to 0's if the answers from students do not match the answer key. I think this could use a nested for loop but there might be a different way to to this.