Here, you can do these two things:
1. The 'review/score' column is not an integer type. So, try to convert it to int type.
2.You can use groupby as you have to run only one operation in your pivot table:
user_product_rating = df.groupby(['review/userID'])['product/productID'].mean()