A Python-based exploratory data analysis of a retail sales dataset, uncovering growth trends, profitability gaps, and regional/segment performance across two years of order data.
This project analyzes 5,901 transaction records (3,003 orders, 773 customers) from a retail "SuperStore" dataset spanning January 2019 – December 2020. The goal was to go beyond top-line revenue and identify where growth was healthy versus where it was masking profit erosion.
| Rows | 5,901 |
| Unique Orders | 3,003 |
| Unique Customers | 773 |
| Date Range | 2019-01-01 to 2020-12-31 |
| Columns | Order ID, Order Date, Ship Date, Ship Mode, Customer ID, Segment, Region, Category, Sub-Category, Sales, Profit, Payment Mode, Returns |
- Python 3
- Pandas — data cleaning, aggregation, pivot analysis
- Matplotlib — visualization / dashboard generation
- Total Sales: $1,565,804 | Total Profit: $175,262
- Overall Profit Margin: 11.19%
- Return Rate: 4.86% of line items
| Metric | Growth |
|---|---|
| Sales | +77.3% |
| Profit | +14.2% |
| Orders | +28.4% |
| Active Customers | +8.6% |
Headline insight: Sales grew 5x faster than profit — a classic margin-erosion pattern that isn't visible from revenue figures alone.
- West is the healthiest region: +81.7% sales growth and +82.1% profit growth, with the best margin (12.99%).
- Central and South are red flags: both grew sales 80%+ YoY while profit fell 62.1% and 50.0% respectively — likely driven by discounting or cost inefficiencies.
- Home Office: strongest segment, +93.6% sales / +40.3% profit growth.
- Corporate: sales +77.7% but profit -13.7% — growing revenue at the expense of margin.
- Technology has the best margin (19.2%); Furniture the weakest (2.2%).
- Office Supplies grew sales fastest (+168%).
- Loss-making sub-categories: Tables (-$11,092), Supplies (-$1,654), Bookcases (-$343).
- Most profitable sub-categories: Copiers ($42,775), Accessories ($25,337), Phones ($22,309).
- COD is both the largest (40.3% of orders) and fastest-growing (+88.0%) payment method, ahead of Online (+83.4%) and Cards (+50.5%).
- Active customers grew a modest 8.6%, but orders per active customer rose from 2.06 to 2.44 — existing customers are buying more often, suggesting growth is being driven more by retention/frequency than new acquisition.
Running the script generates a 6-panel dashboard (superstore_insights_dashboard.png) covering:
- Sales vs. Profit by year
- Payment mode sales by year
- Segment sales by year
- Region profit by year
- Profit margin % by category
- Best vs. worst sub-categories by profit
- Place
SuperStore_Sales_Dataset.csvin the same directory as the script. - Install dependencies:
pip install pandas matplotlib
- Run the analysis:
Or in Jupyter, run cell-by-cell using
python superstore_insights_analysis.py
%run superstore_insights_analysis.py, or copy each numbered section (1. LOAD & CLEAN DATA,2. OVERALL SNAPSHOT, etc.) into its own cell. - Console output prints all metrics; the dashboard image is saved to the working directory.
- Investigate discounting/cost practices in the Central and South regions and the Corporate segment — sales growth there is not converting to profit.
- Review pricing or sourcing on Tables, the single largest loss-making sub-category.
- Double down on what's working: West region, Technology category, and Home Office segment are the strongest performers on both growth and margin.
Tejas Teke