Difference between revisions of "Jupyter"
Jump to navigation
Jump to search
Line 19: | Line 19: | ||
E.g. to install a new module: | E.g. to install a new module: | ||
!pip install <modulename> | !pip install <modulename> | ||
+ | |||
+ | ;Time a command with output | ||
+ | :time <commmand> | ||
+ | |||
+ | ;Time a command running it 100000 times, no output | ||
+ | :%timeit <commmand> |
Revision as of 12:44, 27 October 2019
The jupyter notebook is a great tool for experimenting with python code and document it in one go.
A notebook consists of cells that have Code or Markdown text in it.
Keyboard shortcuts
- dd delete cell
- a paste a new empty cell above the current cell
- b paste a new empty cell below the current cell
- y change cell type to code
- m change cell type to Markdown
- c copy cell
- v paste copied cell below current cell
- h show help
Other tricks
To execute shell command start the cell with a !
E.g. to install a new module:
!pip install <modulename>
- Time a command with output
- time <commmand>
- Time a command running it 100000 times, no output
- %timeit <commmand>