Jupyter Notebook とは
Jupyter Notebook とは、ブラウザで1行ごとにコードを実行したり、メモ帳として使える OSS です。

The Jupyter notebook is a web-based notebook environment for interactive computing.
https://github.com/jupyter/notebook
Jupyter Notebook をインストール
以下のいずれかの方法で Jupyter Notebook をインストールします。
インストール方法
pip コマンドを利用しない方法
Anaconda というディストリビューションに Jupyter Notebook が含まれているため、以下のリンク先からダウンロードしてインストールします。

Anaconda | The World's Most Popular Data Science Platform
Anaconda is the birthplace of Python data science. We are a movement of data scientists, data-driven enterprises, and open source communities.
pip コマンドを利用する方法
pip install notebook
Jupyter Notebook の起動方法
jupyter notebook
自動で Jupyter Notebook が開きます。
Jupyter Notebook の開き方
手動で Jupyter Notebook を開く場合は http://localhost:8888/tree にアクセスします。
トークンが要求される場合は、以下のコマンドを実行します。
jupyter notebook list
Currently running servers: .http://localhost:8888/?token=c8de56fa... :: /Users/you/notebooks
レスポンスにある "token=" に続く文字列をトークンとして入力し、[ログイン] を選択します。

Jupyter Notebook の使い方
ここでは基本的な Jupyter Notebook の使い方を説明します。
わからない操作は後述するヘルプを確認してください。
ノートブックを作成

- [新規] を選択
- [Python3] を選択
セルのコマンドを実行

- 実行したいコマンドの入力
- (Mac) = [Command] + [Enter] で実行
(Windows) = [Shift] + [Enter] で実行
セルのモード 緑と青
Jupyter Notebook は次の2つのモードがあり、[Esc] キーで変更できます。
- セルの左が緑:エディットモード (テキストを入力するモードです)
- セルの左が青:コマンドモード (ショートカットキーを実行するモードです)


コマンドモードで「h」キーを押すと help (操作方法) が確認できます。
ノートブックを保存
以下の赤枠で囲まれたアイコンでノートブックを保存できます。

参考資料
GitHub - jupyter/notebook: Jupyter Interactive Notebook
Jupyter Interactive Notebook. Contribute to jupyter/notebook development by creating an account on GitHub.