SAMANTUS Python for Data Analytics — Complete Training Manual CAPSTONE PROJECT 05
← Back to Course Index

Amazon Product Analysis


On This Page

Capstone Project 5: Amazon Product Analysis


C5.1  Project Overview

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

ColumnDescription
product_nameName of the product
categoryProduct category
priceListed price in Rs.
ratingAverage customer rating (1-5)
num_reviewsTotal number of customer reviews

Sample scope: 300 product listings across 5 categories.

C5.4  Objectives


C5.5  Step-by-Step Solution

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.1 — Average product rating by category.
Figure C5.2 — Relationship between product price and customer rating.
Figure C5.2 — Relationship between product price and customer rating.
Figure C5.3 — Distribution of number of reviews per product.
Figure C5.3 — Distribution of number of reviews per product.

C5.9  Key Insights

C5.10  Business Recommendations