Jupyter Notebooks are interactive environments for executing code, primarily in Python. Notebooks (.ipynb
) find broad use wherever Python is used, especially in machine learning and data science.
Language support in Jupyter is dependent on a kernel, which is an environment where code can be executed. There’s broad official support for languages like R, Julia, or Ruby, and community support for more. The Python kernel is called IPython.
Development tips
- To retrieve the output of the
i
-th cell, we can use theOut[i]
dictionary. - To store the result of variables even if the kernel restarts, we can use the command
%store -r var_name
. - When our notebook pipelines are done, we should convert to a
.py
source file. This ensures reproducibility and that we can incorporate unit tests.