Machine learning

Stage 1 · Lesson 2 of 8

Working in Jupyter notebooks

Python for data

A is one document that mixes code, its output, charts and your notes. That makes it the standard place to explore data. Learn the basics: run a cell with Shift+Enter, restart the (the Python process behind the notebook), inspect a variable, and write down what you found in cells.

The danger is . Cells can run in any order, so a notebook that works for you may fail for someone who runs it top to bottom. For example, a variable may come from a cell you have since deleted.

Before you trust a result, use Restart and Run All. Move anything you reuse, such as cleaning functions, into a .py file you import. Notebooks are for exploring; scripts are for repeating.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Practise

  • The Python, Pandas and Data Visualization micro courses, in browser notebooks

Keep handy

  • Start with 10 minutes to pandas, then look up indexing, groupby and reshaping

  • Quick NumPy, pandas and Matplotlib lookups with a try-it editor

Mark this stage as not done?