i want to build a collaborative user-base model and i have 20 users and 2234 items i have table of 20 users that rated 2234 movies (most users didn't rate not all of them). i have this sort of table :
 userId   movieId  Rating
    1       123      3.5
    1       36       2.2
    1       42       4.1
    2        .       3.1
    2        .        .
    3        .        .
    .        .        .
    .        .        .
    20       .        .
and I want to become like this :
i want to became a matric that have 20 user row and 2234 columns and the value is rating.
How can i do it ?

 
    