Ground Floor, Adamson House, Towers Business Park, Wilmslow Rd, Manchester M20 2YY

Forecasting for Customer Operations using Python – how I got started

Philip Stubbs shares how he learned about Python in 2024

As I wrote in another article, using Python can add significant value to the resource planning of customer operations (eg contact centre, back office or field operation). One of the most impactful applications is forecasting, where Python can help achieve commercial benefit by selecting the best model for each interaction type.

But how do you get started using Python for forecasting? I’ve been asked this a few times recently, so here’s my story of how I began earlier this year:

1️⃣ Download Anaconda Navigator and launch Spyder
Anaconda Navigator provides an all-in-one platform for Python tools, and Spyder is an intuitive environment for writing, editing, and running Python code. It’s free to individual practitioners at home or to businesses up to 200 employees.

2️⃣ Download some game code
To get used to the platform and the Python language, I started with games. The one I remember best was Snake (link in comments), which demonstrated how to code conditions, as well as for and while loops. It was both fun and instructive to tweak the code and see what it does to the game. My two sons are learning Python programming at school, so we worked on this together.

3️⃣ Read “Data Science for Supply Chain Forecasting” by Nicolas Vandeput
While the book focuses on product demand rather than customer operations, it includes practical, easy-to-follow Python code examples that I was able to adapt. It’s accessible for beginners to Python and detailed enough to get you started with both statistical and machine learning methods. Make sure you get the 2nd edition.

4️⃣ Take on your first forecasting challenge
Start small. I wrote Python code to open an example of weekly email volumes that I had in a csv file. I then calculated a four-week moving average to create a forecast, and calculated the error using several different KPIs. Then I adapted the code to calculate the error measures resulting from a wide range of forecasting methods, both statistical & ML. Nicolas’s book is an excellent reference to use for this.

5️⃣ Learn the fundamentals of Python
Numpy and Pandas are libraries that help with performing calculations and manipulating data. I found Jake Vanderplas‘s “Python Data Science Handbook” (2nd edition) a very good reference for these, and I also benefited from courses on LinkedIn Learning. There are plenty of learning options on platforms like Udemy as well.

6️⃣ Use ChatGPT – carefully
I’ve found ChatGPT helpful for answering specific questions and also for troubleshooting issues. For example, if there is an error with your code, it might identify and fix it for you.

These steps helped to get me started, but everyone’s journey is different. I wish you well with your Python adventure!

More Insight