for userID, curUser in user_Group:
# Create a temp that stores every movie's rating
temp = [0]*len(movies_df)
# For each movie in curUser's movie list
for num, movie in curUser.iterrows():
# Divide the rating by 5 and store it
temp[movie['List Index']] = movie['Rating']/5.0
# Add the list of ratings into the training list
trX.append(temp)
This is portion of my code for a movie recommendation system and I'm getting the list indices must be integers or slices, not numpy.float64
error. Why is that happening?