Created
September 29, 2019 10:28
-
-
Save dradecic/ef33ad4c942c2d013def6ed0c4945bc8 to your computer and use it in GitHub Desktop.
recommender1_6_num_ratings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num_ratings = pd.DataFrame(data.groupby('movieId').count()['rating']).reset_index() | |
data = pd.merge(left=data, right=num_ratings, on='movieId') | |
data.rename(columns={'rating_x': 'rating', 'rating_y': 'numRatings'}, inplace=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment