PyData Seattle 2025

Going From Notebooks to Production Code
2025-11-09 , Tutorial Track 2

Do you need to move your code from notebooks into production? Or do you want to level up your software engineering skills? In this tutorial, we will show you how to turn a Jupyter notebook into a robust, reproducible Python script. You will learn how to use tools for converting notebooks into scripts, how to make your code modular, and how to write unit tests.


Jupyter Notebooks are a fantastic tool that make it very easy to get started on a project. But often you’ll need to go from code that gives you insights or results to robust, reproducible code that runs automatically.

In this tutorial we will explain strategies that will help you smoothly refactor your code, and work through an example where we convert an existing Jupyter notebook (available on GitHub) into production-ready code.

We will:
- Explain when and why you might decide to convert your notebook to standalone scripts
- Get setup and explain what the provided notebook does
- Convert the notebook to a script using appropriate tools and ensure it runs and produces the correct output
- Discuss the principles of modular code and apply those principles to the code
- Introduce unit tests and implement one or two
- Discuss how AI coding tools can help with this process.

Participants will need to know how to clone a git repository, as well as basic knowledge of pandas and scikit-learn.


Prior Knowledge Expected:

Previous knowledge expected

Catherine Nelson is an experienced data scientist and ML engineer, and the author of two O'Reilly books: Software Engineering for Data Scientists (2024) and Building Machine Learning Pipelines (2020). Previously, she was a Principal Data Scientist at SAP Concur, where she deployed NLP models to production and created innovative features including ML-powered carbon emissions analytics. She is currently consulting for startups on AI evaluation and developer relations. Catherine holds a PhD in Geophysics from Durham University and a Masters in Earth Sciences from Oxford University.

Robert Masson is a Senior Principal Data Scientist at Atlassian using data to inform strategic decisions at the company. He previously worked 11 years as a data scientist at Meta and 3 years as a quant at a hedge fund. Robert has a PhD in Mathematics from University of Chicago.