Machine Learning

Jupyter Notebook

A Jupyter notebook is an interactive document that combines executable code cells, their outputs, charts, and explanatory text, and it is the standard workspace for data exploration and model prototyping.

What is a Jupyter notebook?

A Jupyter notebook is an interactive document that mixes executable code, usually Python, with the output of that code, charts, and written explanation. The notebook connects to a kernel that runs each cell on request and keeps variables in memory between cells, so an analyst can load a dataset once and then query, plot, and model it step by step. The file is saved with its outputs, which makes it a record of an analysis as well as a program. JupyterLab and hosted notebook services provide the same model with more tooling.

Why Jupyter notebooks matter

Notebooks are where most data science and model prototyping happens. A finance analyst at a distribution company explores invoice aging in a notebook, finds that one customer segment drives most late payments, and shares the notebook with the charts in place. Their weakness is the same flexibility. Cells can be run out of order, hidden state makes results hard to reproduce, version control shows unreadable differences, and credentials get pasted into cells. A notebook running in production is a common and fragile anti-pattern. The usual practice is to explore in the notebook and then move the working logic into tested scripts and a machine learning pipeline.

What to watch for

  • Run notebooks on a governed server near the data rather than on laptops holding production extracts.
  • Keep credentials in a secrets manager rather than in notebook cells.
  • Restart the kernel and run every cell from the top before trusting a result.

← Back to AI Glossary