Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 2.29 KB

jupyter_notebook.md

File metadata and controls

57 lines (41 loc) · 2.29 KB

Jupyter Notebook Commands & Shortcuts

In Kaggle 2017 data science survey of 16K data scientists, Jupyter Notebook came up as 3rd most important self-reported tool for data science.

Notebook Features

  • can add text, images, code - all in one place
  • can document what we're doing as we go along and code
  • can put pictures, videos, html tables, interactive widgets
  • great experimentation environment

Help

h shows the list of shortcuts

Notebook Commands / Shortcuts

  • Shift + Enter to run cell
  • Shift + Tab First time pressing: tells you what parameters to pass
  • Shift + Tab Press 3 times: gives additional info about method

Select multiple cells

ESC Shift+ ⬆️ extend select cells above
ESC Shift+ ⬇️ extend select cells below

Notebook Source Code Access

to look at documentation for code (or function)

  • ? + function name
    • Example: ?ImageClassifierData.from_paths

to look at source code for a function

  • ?? + function name
    • Example: ??ImageClassifierData.from_paths

to find out where a particular function or class comes from

  • function name , then Shift + Enter
    • Example of Input: ImageClassifierData Shift + Enter
      • Example of Output: fastai.dataset.ImageClassifierData
    • Example of Input: display Shift + Enter
      • Example of Output: <function IPython.core.display.display>

to find out what parameters that the function can take, also shows default parameter options

  • Within function, Shift + Tab
  • object, then Tab shows all the options for that object or function

Convert your notebooks to .md

jupyter nbconvert --to <output format> <input notebook> 

Jupyter Notebook Gist Sharing

  • press the Gist share button (the yellow highlighted one). It will generate a link for your Jupyter notebook to share for trouble-shooting.

Resources