I'm working on clustering and I need to tranform my data in matrix. This is my df:
el1 el2 value
1 a x 1
2 a y 2
3 a z 3
2 b x 2
3 b y 3
3 b z 3
I need to transform it in matrix, having el1 and el2 as rows and cols names and the corresponding value.
x y z
a 1 2 3
b 2 3 3
How I can do? Thanks!