Sales analytics
E-commerce Sales Analysis
- 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
- 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.
- 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.
- 3Show how revenue changed month by month and compare 2025 with 2024. Call out any seasonal patterns.
- 4Break revenue down by product category and find the best-selling products. Look at how the category mix changes through the year.
- 5Compare categories on how often their orders are returned or canceled, and on average order value.
- 6Create at least three clear, labeled charts that support your main points.
- 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
| Column | Type | Description |
|---|---|---|
| order_id | integer | Unique ID of the order. |
| customer_id | integer | The customer who placed the order. |
| order_date | datetime | When the order was placed (UTC). |
| status | text | Final state of the order: completed, canceled or returned. |
| payment_method | text | How the customer paid. |
| discount_code | text | Promo code used on the order, if any. |
| shipping_fee | decimal | Shipping charged to the customer, in USD. |
Preview the first 5 rowsHide preview
| order_id | customer_id | order_date | status | payment_method | discount_code | shipping_fee |
|---|---|---|---|---|---|---|
| 100001 | 1530 | 2024-01-01 09:24:45 | completed | credit_card | empty | 6.95 |
| 100002 | 3531 | 2024-01-01 10:37:49 | completed | credit_card | empty | 0 |
| 100003 | 840 | 2024-01-01 10:59:09 | completed | credit_card | empty | 0 |
| 100004 | 725 | 2024-01-01 12:48:34 | completed | apple_pay | WELCOME10 | 0 |
| 100005 | 3452 | 2024-01-01 17:44:03 | completed | gift_card | empty | 0 |
order_items.csv
One row per product line in an order.
15,608 rows · 5 columns · 347 KB
| Column | Type | Description |
|---|---|---|
| order_id | integer | The order this line belongs to. |
| product_id | integer | The product bought. |
| quantity | integer | Number of units bought. |
| unit_price | decimal | Price of one unit at the time of the order, in USD, before discounts. |
| discount_amount | decimal | Total discount taken off this line, in USD. |
Preview the first 5 rowsHide preview
| order_id | product_id | quantity | unit_price | discount_amount |
|---|---|---|---|---|
| 100001 | 1031 | 1 | 38.99 | 0 |
| 100002 | 1087 | 1 | 45.99 | 0 |
| 100002 | 1072 | 1 | 141.99 | 0 |
| 100003 | 1048 | 1 | 139.99 | 0 |
| 100004 | 1083 | 1 | 19.99 | 2 |
products.csv
The store's product catalog.
90 rows · 5 columns · 4 KB
| Column | Type | Description |
|---|---|---|
| product_id | integer | Unique ID of the product. |
| product_name | text | Name shown on the website. |
| category | text | Product category. |
| list_price | decimal | Current catalog price, in USD. |
| unit_cost | decimal | What one unit costs the store, in USD. |
Preview the first 5 rowsHide preview
| product_id | product_name | category | list_price | unit_cost |
|---|---|---|---|---|
| 1001 | Brass Chef Knife | Kitchen | 61.99 | 38.13 |
| 1002 | Walnut Cutting Board | Kitchen | 138.99 | 74.76 |
| 1003 | Matte Black Dutch Oven | Kitchen | 22.99 | 13.5 |
| 1004 | Classic Skillet | Kitchen | 75.99 | 39.86 |
| 1005 | Linen Mixing Bowl Set | Kitchen | 79.99 | 41.11 |
customers.csv
One row per customer account.
3,600 rows · 4 columns · 108 KB
| Column | Type | Description |
|---|---|---|
| customer_id | integer | Unique ID of the customer. |
| signup_date | date | Date the customer created an account. |
| state | text | US state from the customer's shipping address. |
| acquisition_channel | text | How the customer first found the store. |
Preview the first 5 rowsHide preview
| customer_id | signup_date | state | acquisition_channel |
|---|---|---|---|
| 1 | 2024-09-13 | CO | organic_search |
| 2 | 2025-10-21 | IL | paid_search |
| 3 | 2025-01-17 | AZ | referral |
| 4 | 2024-06-23 | FL | paid_social |
| 5 | 2025-04-08 | IL | paid_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.