IPython Notebooks are just files (.ipynb
) on your file system
The Notebook server is aware of Notebooks in a single directory, which we call the Notebook directory
If you cd to a Notebook directory and type:
ipython notebook
you will see the Notebooks in that directory in the dashboard
Notebook files:
.ipynb
) on your file systemfrom IPython.nbformat import current
with open('00 - Notebook Basics.ipynb') as f:
nb = current.read(f, 'json')
nb.worksheets[0].cells[0:5]
IPython Notebooks can also be exported to .py
files (see "File:Download As" menu item). You can tell the Notebook server to always save these .py
files alongside the .ipynb
files by starting the Notebook as:
ipython notebook --script
You can import Notebooks from the main Dashboard or simply by copying a Notebook into the Notebook directory.
Find a Notebook on http://nbviewer.ipython.org and Download it. Then import it into your running Notebook server using the Dashboard.
Create a new Notebook that has at least one of each cell type. Practice the following cell operations:
Shift-Enter
to run a cellCtrl-Enter
to run a cell in placeCtrl-m ?
Ctrl-m h
Go back to that last Notebook and repeat some of those cell operations using keyboard shortcuts: