Laptop market data cleaning & recommendations
Cleaned a messy scrape of 4,445 Amazon laptop listings down to 2,294 analysis-ready rows, then used the clean data to recommend five laptops under $1,500 for each of two customer profiles.
The brief
COMP2271 Data Science (2023–24) gave us a real dataset of laptops scraped from Amazon.com. The task had two parts: clean it into a usable state, then recommend five laptops under $1,500 for each of two client personas. Analysis had to use only pandas and seaborn, with the reasoning written up in a 750-word report.
Source: amazon_laptop_2023.xlsx and amazon_laptop_2023_cleaned.xlsx
Cleaning the data
The raw export mixed units, text and numbers in the same columns and had many gaps. I wrote a reproducible cleaning pipeline:
- Parsed screen size, RAM and storage into numbers, converting terabytes to gigabytes.
- Normalised brand names and stripped "$" and thousands separators from prices.
- Removed exact duplicates and rows missing the model, price, screen size, RAM or storage.
- Filled missing ratings with the column mean, and missing descriptive fields (colour, CPU, operating system, graphics) with an explicit "None".
- Dropped the sparsely populated CPU-speed column.
Cleaning pipeline
- 01Raw scrape4,445 listings with mixed units and gaps
- 02StandardiseNumeric sizes, RAM, storage and prices; consistent brand names
- 03De-duplicate & dropDuplicates and rows missing key specs removed
- 04ImputeMean rating; explicit "None" for missing descriptions
- 05Clean dataset2,294 rows ready for analysis
Recommending laptops
Client 1, a gamer: at most $1,500, at least 16 GB of RAM and 1 TB of storage, Windows, and dedicated graphics, ranked by customer rating. The shortlist: Acer Nitro 5, two configurations of the Dell G15 5525, Asus Vivobook Pro 15 and Asus ROG Strix G15.


Client 2, a travelling manager who prefers Dell: at most $1,500, a Dell, a screen of at least 15 inches, at least 8 GB of RAM and integrated graphics. The result was five 15.6-inch Dells (Latitude 3000, Inspiron 3511, Latitude 5540, Vostro and Precision 5560), all between $784 and $798.
