Ideally it should be returning values between -1 and 1 for every cell except for the cells that have the same column name and row name those need to have a 1 value
Tried replacing the NaN with 0 before doing corr() and it returns proper values but those values are inaccurate for the purpose of the program
# df
MovieA MovieB MovieC MovieD MovieE
Angee 0.000000 NaN -0.500000 0.500000 NaN
Anirvesh 1.166667 -0.333333 -0.833333 NaN NaN
Jay 1.166667 -0.333333 NaN -0.833333 NaN
Karthik 0.000000 -1.500000 NaN NaN 1.5
Naman NaN 0.250000 NaN -0.250000 NaN
# df.T.corr()
Angee Anirvesh Jay Karthik Naman
Angee 1.0 1.0 -1.0 NaN NaN
Anirvesh 1.0 1.0 1.0 1.0 NaN
Jay -1.0 1.0 1.0 1.0 1.0
Karthik NaN 1.0 1.0 1.0 NaN
Naman NaN NaN 1.0 NaN 1.0