This project analyzes Amazon product listings to understand rating patterns across categories and the relationship between price and customer satisfaction.
C5.2 Business Problem
A seller analytics platform wants to help merchants understand which product categories earn the best ratings, and whether higher prices hurt customer satisfaction.
C5.3 Dataset Description
Column
Description
product_name
Name of the product
category
Product category
price
Listed price in Rs.
rating
Average customer rating (1-5)
num_reviews
Total number of customer reviews
Sample scope: 300 product listings across 5 categories.
C5.4 Objectives
Compare average ratings across product categories
Analyze the relationship between price and customer rating
Understand the distribution of review counts across products
Recommend pricing and category strategies for sellers
C5.5 Step-by-Step Solution
Step 1: Load the Amazon product listings CSV into Pandas
Step 2: Clean missing prices/ratings and remove duplicate listings
Step 3: Calculate average rating per category
Step 4: Create a scatter plot of price vs rating
Step 5: Analyze the distribution of review counts using a histogram
Step 6: Summarize seller-focused recommendations
C5.6 Complete Python Code
► amazon_analysis.py
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv("amazon_products.csv")
df = df.dropna(subset=['price','rating']).drop_duplicates()
avg_rating_by_cat = df.groupby('category')['rating'].mean().sort_values(ascending=False)
print("Average Rating by Category:\n", avg_rating_by_cat.round(2))
correlation = df[['price','rating']].corr()
print("Price-Rating Correlation:\n", correlation)
plt.scatter(df["price"], df["rating"], alpha=0.5)
plt.title("Price vs Rating")
plt.savefig("price_rating.png")
C5.7 Expected Output
Output
Average Rating by Category: Books 4.50 Home 4.30 Beauty 4.20 Electronics 4.10 Fashion 3.90
C5.8 Visualizations
Figure C5.1 — Average product rating by category.Figure C5.2 — Relationship between product price and customer rating.Figure C5.3 — Distribution of number of reviews per product.
C5.9 Key Insights
Books earn the highest average rating (4.5), while Fashion lags at 3.9 — likely due to sizing/fit inconsistency issues common in the category.
There is a mild negative relationship between price and rating — higher-priced items tend to score slightly lower, possibly due to raised customer expectations.
Most products have a relatively small number of reviews, with a long tail of a few highly-reviewed bestsellers — a classic 'winner-takes-most' pattern.
C5.10 Business Recommendations
Fashion sellers should invest in better size guides and product descriptions to reduce rating-damaging returns and mismatched expectations.
Premium-priced listings should over-invest in post-purchase support, since expectations (and risk of disappointment) rise with price.
New sellers should prioritize driving initial reviews aggressively, since review count itself appears to compound visibility and trust once a critical mass is reached.