How make array from dataframe

I have a big DataFrame in which I have several columns including user_id and a rating.

(In addition, I inserted the unique_user_id column (when user_id repeats, we set one value (Window Function was used))

How can I extract tables with corresponding value for a given user_id?

for example, we have user_id = 123 and rating for it 1,2,3,4,5,6,7,8 I would like to:

array_123 = [1,2,3,4,5,6,7,8]

Screenshot%20from%202018-04-19%2011-27-09