I use the pd.pivot_table() method to create a user-item matrix by pivoting the user-item activity data. However, the dataframe is so large that I got compla
You can use groupby instead. Try this code:
groupby
reviews.groupby(['userId','movieId'])['rating'].max().unstack()