This post provides a short intro on picking up useful Jupyter hacks. We begin with a short overview of the most essential Jupyter shortcuts and skills. If you have not read the introduction to Jupyter you should do that immediately, see here.
Keyboard short cuts
Editing and executing cells
- enter edit mode: click inside the cell or press
- exit edit mode: click outside cell or press
- executing code within a cell is
ENTR (not same!)
Adding removing cells (command mode only)
- delete a cell:
- add cell:
Converting between markdown and code (command mode only)
- as markdown:
- as code:
See all Jupyter keyboard shortcuts in menu (top):
Help > Keyboard Shortcuts, or press
H in command mode.
Within Jupyter the
TAB command will autocomplete your code. This can also be used to see which methods are available for a given object.
Using the syntax
%matplotlib inline allows you to make figures within Jupyter notebook.
Execute a cell with
?fct will give you information about the function
fct. Note this command also work on objects’ methods.
DataCamp has some excellent resources for picking up additional Jupyter skills. Their cheatsheet, available here, is excellent to print out and have is a coding aid. For a comprehensive overview of Jupyter to check out the official documentation, see here.
If you have other relevant stuff that you wish to share, make a pull request in our course page’s GitHub repo.