text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

books = pd.read_csv('//kaggle/input/book-recommendation-dataset/Books.csv')
ratings = pd.read_csv('//kaggle/input/book-recommendation-dataset/Ratings.csv')
users = pd.read_csv('//kaggle/input/book-recommendation-dataset/Users.csv')

ratings.isnull().sum()

books.isnull().sum()

ratings_name = ratings.merge(books, on='ISBN')
ratings_name

no_of_rating = ratings_name.groupby('Book-Title').count()['Book-Rating'].reset_index()
no_of_rating.rename(columns={'Book-Rating': 'num_of_rating'}, inplace=True)
no_of_rating

average_rating = ratings_name.groupby('Book-Title').mean()['Book-Rating'].reset_index()
average_rating.rename(columns={'Book-Rating': 'avg_rating'}, inplace=True)
average_rating

popular_books = no_of_rating.merge(average_rating, on='Book-Title')
popular_books

popular_books_df = popular_books[popular_books['num_of_rating'] >= 500].sort_values('avg_rating', ascending=False)
popular_books_df