[PYTHON] Jupyter Notebook Basics of how to use

Jupyter Notebook Overview

In this article, I'll take a note of the basics of Jupyter Notebook, which seems to be the most widely used interactive shell.

The interactive shell is excellent in the coding environment in the following points.

  1. Easily track command history
  2. Inputs and outputs can be easily reflected and confirmed (graphs and images can be easily incorporated).
  3. Easy to explain the code contents

In Jupter Notebook, UI elements, HTML, and even JavaScript can be incorporated into code files by using widget functions.

Installation method reference-> Illustration! Thorough explanation of Jupyter Notebook! (How to install / use / start / exit)

Cell Type

The following Cell Types can be selected on the Jupter Notebook. image.png


A Cell in which you can enter any Python Code. You can execute the code contents with Shift + Enter, and the corresponding result is output to the Output Cell.


The Jupyter Notebook is a great way to explain the code content, because of this Markdown Cell. In Markdown Cell, you can write a description of the code content using Markdown commands or HTML. In addition, LaTex format formulas using MathJax can also be described, so it is highly versatile.

RAW You can write text flat without any command.

HEADING You can easily create a header structure on the code description. It can be described in the same way in MARKDOWN CELL.

Keyboard shortcuts

Shortcuts for using Jupyter Notebook can be found by pressing the keyboard on the notebook below. image.png

Make a note of the frequently used ones below.

keyboard Shortcut content
Shift+Enter Execute the selected cell.
b Add a new cell under the currently selected Cell.
a Add a new cell on top of the currently selected Cell.
d-d Delete the currently selected Cell.
1-6 Automatically#In the markdown cell for the number of numbers, create a header.
m Change the selected Cell to MARKDOWN CELL.
y Change the selected Cell to CODE CELL.
c Copy the selected Cell.
v Paste the copied Cell.
0-0 Restart the kernel.
i-i Stop code execution.
s Save the Notebook.

How to write Markdown cell

Most of the description method is the same as the expression in Qiita.

Description expression Markdown notation
Italic/ Hello *Hello*
bold/ Hello *Hello*
Strikethrough/ ~~Hello~~ ~~Hello~~
URL /Google [URLtext](http://www.google.com)
Latex body/\LaTeX $\LaTeX$
new line Add a blank line below the text you want to break.
header At the beginning of the sentence you want to put in the header"#"Attach."#"Level can be changed by the number of. 1-The same description is possible with 6 keyboard shortcuts.
Quote, reprint At the beginning of the sentence">"To describe
list At the beginning of the sentence"*"‚óŹ List in notation. At the beginning of the sentence"1."If you enter equal numbers, it will be a list in numerical notation. Note that each keyword requires a space after it.

Recommended Posts

Jupyter Notebook Basics of how to use
How to use Jupyter Notebook
How to use jupyter notebook with ABCI
Basics of PyTorch (1) -How to use Tensor-
How to use Jupyter notebook [Super Basic]
How to use IPython Notebook
Summary of how to use pandas.DataFrame.loc
Summary of how to use pyenv-virtualenv
Easy to use Jupyter notebook (Python3.5)
Summary of how to use csvkit
How to see the contents of the Jupyter notebook ipynb file
[Python] Summary of how to use pandas
How to calculate Use% of df command
How to execute commands in jupyter notebook
[Python2.7] Summary of how to use unittest
Summary of how to use Python list
[Python2.7] Summary of how to use subprocess
[Question] How to use plot_surface of python
How to use jupyter notebook without polluting your environment with Docker
How to use Jupyter on the front end of supercomputer ITO
How to use xml.etree.ElementTree
How to use Python-shell
How to use tf.data
How to use virtualenv
How to use Seaboan
How to use image-match
How to use shogun
How to use Pandas 2
How to use numpy.vectorize
How to use pytest_report_header
How to use partial
How to use Bio.Phylo
How to use SymPy
How to use x-means
How to use WikiExtractor.py
How to use IPython
How to use iptables
How to use numpy
How to use TokyoTechFes2015
How to use venv
How to use dictionary {}
How to use Pyenv
How to use list []
How to use python-kabusapi
How to use OptParse
How to use return
How to use dotenv
How to use pyenv-virtualenv
How to use Go.mod
How to use imutils
How to use import
How to use folium (visualization of location information)
How to debug with Jupyter or iPython Notebook
[Python] How to use two types of type ()
Not much mention of how to use Pickle
Summary of how to use MNIST in Python
Jupyter Notebook Settings-How to use (EC2 Amazon Linux 2)
How to use Qt Designer
[IPython] How to Share IPython Notebook
How to use search sorted
[gensim] How to use Doc2Vec