0

I have a dataframe that is something like this:

STUDENT_ID    SUBJECT_ID     MARK
    1             1           10
    2             1           8
    1             2           9 
    3             2           10 
    4             5           10
    4             3           7 
    3             1           10 
    2             2           9 

What I wanted to do is study the correlation between the marks of two subjects, suppose the ones with the ID 1 and 2. Problem is not all students have studied both subjects. So I wanted to create a different table with something like.

STUDENT_ID    SUBJECT 1 MARK    SUBJECT 2 MARK
    1                10                9
    2                 8                9
    3                10               10

Any idea of how could I accomplish that?

0 Answers0