All Data Labs

Sales analytics

E-commerce Sales Analysis

easy2–3 hours4 datasets
Company
Wayfair
Job positions
Data AnalystBusiness AnalystBI Analyst
Topics
Data cleaningpandasTime series trendsData visualizationBusiness storytelling

The scenario

Wayfair: Clean two years of online store orders and turn them into a clear sales review for next year's plan.

Wayfair sells furniture and home goods online across the US, from kitchenware and bedding to lighting and decor. You're a data analyst on the e-commerce team. The head of e-commerce is preparing next year's plan and wants an honest picture of how sales went in 2024 and 2025. The order data comes straight from an export, so it hasn't been checked or cleaned.

Your task

Clean the store's order data, then build a short sales review that shows how revenue changed over the two years, what drove it, and where the business should focus next year.

Instructions

  1. 1Load the four files and check each one for problems before you analyze anything, such as repeated records, inconsistent labels and missing values. Fix what you find and note every decision you made.
  2. 2Decide which orders count as revenue and how to calculate revenue for an order. Write your definition down so anyone reading your work can follow it.
  3. 3Show how revenue changed month by month and compare 2025 with 2024. Call out any seasonal patterns.
  4. 4Break revenue down by product category and find the best-selling products. Look at how the category mix changes through the year.
  5. 5Compare categories on how often their orders are returned or canceled, and on average order value.
  6. 6Create at least three clear, labeled charts that support your main points.
  7. 7Finish with a one-page summary: three key findings and two recommendations for next year's plan.

Datasets

The data is synthetic and does not come from Wayfair, but it's modeled on how real companies record it, including the mess. All files come in one download.

orders.csv

One row per order placed between January 2024 and December 2025.

9,245 rows · 7 columns · 516 KB

ColumnTypeDescription
order_idintegerUnique ID of the order.
customer_idintegerThe customer who placed the order.
order_datedatetimeWhen the order was placed (UTC).
statustextFinal state of the order: completed, canceled or returned.
payment_methodtextHow the customer paid.
discount_codetextPromo code used on the order, if any.
shipping_feedecimalShipping charged to the customer, in USD.
Preview the first 5 rows
order_idcustomer_idorder_datestatuspayment_methoddiscount_codeshipping_fee
10000115302024-01-01 09:24:45completedcredit_cardempty6.95
10000235312024-01-01 10:37:49completedcredit_cardempty0
1000038402024-01-01 10:59:09completedcredit_cardempty0
1000047252024-01-01 12:48:34completedapple_payWELCOME100
10000534522024-01-01 17:44:03completedgift_cardempty0

order_items.csv

One row per product line in an order.

15,608 rows · 5 columns · 347 KB

ColumnTypeDescription
order_idintegerThe order this line belongs to.
product_idintegerThe product bought.
quantityintegerNumber of units bought.
unit_pricedecimalPrice of one unit at the time of the order, in USD, before discounts.
discount_amountdecimalTotal discount taken off this line, in USD.
Preview the first 5 rows
order_idproduct_idquantityunit_pricediscount_amount
1000011031138.990
1000021087145.990
10000210721141.990
10000310481139.990
1000041083119.992

products.csv

The store's product catalog.

90 rows · 5 columns · 4 KB

ColumnTypeDescription
product_idintegerUnique ID of the product.
product_nametextName shown on the website.
categorytextProduct category.
list_pricedecimalCurrent catalog price, in USD.
unit_costdecimalWhat one unit costs the store, in USD.
Preview the first 5 rows
product_idproduct_namecategorylist_priceunit_cost
1001Brass Chef KnifeKitchen61.9938.13
1002Walnut Cutting BoardKitchen138.9974.76
1003Matte Black Dutch Oven Kitchen22.9913.5
1004Classic SkilletKitchen75.9939.86
1005Linen Mixing Bowl SetKitchen 79.9941.11

customers.csv

One row per customer account.

3,600 rows · 4 columns · 108 KB

ColumnTypeDescription
customer_idintegerUnique ID of the customer.
signup_datedateDate the customer created an account.
statetextUS state from the customer's shipping address.
acquisition_channeltextHow the customer first found the store.
Preview the first 5 rows
customer_idsignup_datestateacquisition_channel
12024-09-13COorganic_search
22025-10-21ILpaid_search
32025-01-17AZreferral
42024-06-23FLpaid_social
52025-04-08ILpaid_social

Hint

Parse the timestamp column while loading the file. Then grouping by month takes one line instead of string slicing.

orders = pd.read_csv("orders.csv", parse_dates=["order_date"])
orders["month"] = orders["order_date"].dt.to_period("M")

Deliverable

A public GitHub repo with your cleaning and analysis (a notebook or scripts), your charts, and a README that summarizes your findings and recommendations.

When you're done, post your repo in the Solutions tab to share it with other learners.

What grading checks

Use this checklist to review your own work before you post and share it.

  • Submitted GitHub repo is public and reachable.
  • Repo contains at least one notebook or script file.
  • Repo has a README with a written summary.
  • Cleaning handles repeated orders, inconsistent category labels and missing prices, and each decision is explained.
  • Revenue is defined clearly and leaves out orders that did not end in a sale.
  • Shows the monthly revenue trend and a 2025 vs. 2024 comparison, including seasonality.
  • Category performance covers revenue and return or cancellation rates.
  • Summary gives three findings and two recommendations backed by the analysis.