Skip to main content
Loading page…
Python Mastery
Chapter 39
Lesson 3 of 4
Reproducibility & Notebook Pitfalls
Contents
Notes
Tutor
Concept
The Hidden-State Trap
Loading activity…
Previous
1 / 9
Continue
Contents
Notes
Discussion
Tutor
22 min
9 activities
0 of 9 done
In this lesson
1
The Hidden-State Trap
2
The Golden Rule of Notebooks
3
Clearing Outputs and Version Control
4
When to Refactor Notebook Code into Modules
5
Parameterizing Notebooks with papermill
6
Import order matters more than you think
7
The Correct Order for a Reproducible Notebook
8
Notebook Practices — Good or Risky?
9
Explain Hidden State in Your Own Words
Objectives
Learner can explain why out-of-order execution causes hidden-state bugs
Learner can apply the 'Restart & Run All' discipline to verify reproducibility
Learner can describe how nbdime improves notebook version control
Learner can decide when notebook code should be moved to a module
Learner can explain what papermill does and when to use it
Further reading
Jupyter documentation
nbformat documentation
Chapter 39 · Jupyter & the Data Science Workflow
Notebooks, Cells & Kernels
The Exploration Workflow
Reproducibility & Notebook Pitfalls
A Guided Notebook Exploration
Previous: The Exploration Workflow
Next: A Guided Notebook Exploration