cc = df.groupby('user').cumcount() + 1
df.set_index(['user', cc]).stack().groupby(level=[0, 1]).apply(np.array
    ).unstack()
Groupby and reshape long to wide formatted dataframe while aggregating elements as arrays