0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

PythonのJupyterを使ってみた

Last updated at Posted at 2022-02-12

目的

Jupyterノートブック利用まで

Jupyter Notebook とは

Jupyter Notebook(ジュピター・ノートブック)とは、ブラウザ上で動作するプログラムの対話型実行環境です。データ分析には欠かせないツールの1つです。

準備

Jupyter Notebookのみであれば、コマンドプロンプトなどPythonが実行できる環境)において、以下のコマンドを実行することでインストール可能です。

C:\Users\user\Documents\python>python3 -m pip install --upgrade pip
C:\Users\user\Documents\python>pip3 install jupyter
C:\Users\user\Documents\python>jupyter notebook

実践

sample1.py
# matplotlib をインラインで使用することを指定する
%matplotlib inline
# ライブラリの読み込み
import matplotlib.pyplot as plt

# グラフを描画する
plt.plot([1,2,3,4])
plt.show()

image.png

わかったこと

  1. Jupyter Notebookでは、入力したプログラムの実行結果が、プログラムの直後に表示されるので、結果が分かりやすく、すぐに確認することができました。
  2. Markdownを記述することができ、コードや実行結果も含めた技術的なドキュメントの作成や共有に役立てることもできました。
    image.png
  3. jupyterSample1.ipynb をgithubやgitlabにプッシュすることでグラフがgithub上で確認できる

参考

https://ai-inter1.com/jupyter-notebook/
https://udemy.benesse.co.jp/development/python-work/jupyter-notebook.html

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?