1
of 6— Prepare your demand history data
What you'll accomplish
By the end of this guide, you'll have a working Python script that builds a statistical demand forecast (exponential smoothing) for your SKUs, calculates forecast error metrics, and outputs a CSV of forecasted demand — using ChatGPT to write and debug the code, no data science degree required.
What you'll need
- Python installed (python.org) and a basic IDE (VS Code, or even Jupyter Notebook)
- ChatGPT account (free) — for code generation and debugging
- Historical demand data as a CSV (SKU, Date/Week/Month, Units Sold)
- Time needed: 60 minutes initial build; run it in 5 minutes after that
- Cost: Free (Python + ChatGPT free tier)
How-To Guide: Build a Statistical Demand Forecast Model in Python with ChatGPT
Step 1: Prepare your demand history data
Export demand history from your ERP as a CSV. You need at minimum:
- A date column (weekly or monthly)
- A SKU/product identifier column
- A units sold column
Example columns: SKU_ID, Week_Ending, Units_Sold
Save it as demand_history.csv.