[PYTHON] I tried VS Code's Jupyter notebook

I tried VS Code's Jupyter notebook.

There was an article about VS Code's Jupyter notebook in the magazine, so I tried it. It was very easy to experience Jupyter notebook, so make a note of your footprints.

Premise

--I tried it on Mac. --In homebrew, python is already installed as python3. --Pip3 is also included when python3 is installed

python3

$ which python3 
/usr/local/bin/python3
$ python3 --version
Python 3.7.5

pip3

$ which pip3
/usr/local/bin/pip3
$ pip3 --version
pip 19.3.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)

Insert the module to be used for Mac

ipython module also includes notebook

$ pip3 install "ipython[notebook]"

↑ On Mac, I was able to do it smoothly without any problems, but on Windows7 + python3.8.0, it failed at the module called pywinpty. It worked fine on Windows7 + python3.7.4.

VS Code side

Put Python in VSCode Extension

スクリーンショット 2019-11-21 20.10.42.png

Execute the following command of VSCode to select the Python module to be used in the operation.

Select Interpreter



 ![スクリーンショット 2019-11-21 20.16.44.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/435600/8b804dc9-855b-3ea9-b633-1c2903497de6.png)

 You will be asked which Python to use, so select python3 that you put in with brew
```/usr/local/bin/python3```
 Choose

 Execute the following command of VSCode to start it.

#### **` Create New Blank Jupyter notebook`**
```python


 ![スクリーンショット 2019-11-21 20.19.08.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/435600/7be8f0fe-bb24-66a3-152e-5ab77bc13ce2.png)

## Try out
 Install the module to be used this time with pip3

$ pip3 install pandas


 Sample I made

import pandas as pd df = pd.DataFrame([[0, 5, 1],[2, 2, 2]], index=['a', 'b'], columns=['A', 'B', 'C']) df


 It worked like this
 ![スクリーンショット 2019-11-21 20.22.13.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/435600/2c4b6c15-deaf-ca0c-88ae-c0cfd4d197c7.png)

## Try it (extra edition)
 The output of pandas looks like something ...
 What was that….
 Uh, my head ...
…。
 This is it! !!

 ![キャプチャ.PNG](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/435600/40560e23-de8b-f8ae-18b6-dc04e76f19c1.png)

 Baseball scoreboard! (Excuse me)







Recommended Posts

I tried VS Code's Jupyter notebook
Somehow I tried using jupyter notebook
[Pythonocc] I tried using CAD on jupyter notebook
I tried to touch jupyter
I want to blog with Jupyter Notebook
I tried simple image recognition with Jupyter
Jupyter Notebook memo
Introducing Jupyter Notebook
I tried scraping
I tried PyQ
Powerful Jupyter Notebook
I tried AutoKeras
I tried papermill
Jupyter notebook password
Jupyter Notebook memo
I tried django-slack
I tried spleeter
I tried cgo
I tried Flask with Remote-Containers of VS Code
I tried launching jupyter nteract on heroku server
I tried to start Jupyter with Amazon lightsail
I tried using parameterized
I tried using argparse
I tried using mimesis
I tried using anytree
I tried competitive programming
I tried running pymc
I tried ARP spoofing
[Python] I immediately tried using Pylance's VS Code extension.
I tried using aiomysql
I tried using Summpy
I tried Python> autopep8
I tried using coturn
I tried using Pipenv
I tried using matplotlib
I tried using "Anvil".
I tried using Hubot
I tried PyCaret2.0 (pycaret-nightly)
I tried using openpyxl
I tried deep learning
I tried AWS CDK!
I tried using Ipython
I tried to debug.
I tried using PyCaret
I tried using cron
I tried Kivy's mapview
3 Jupyter notebook (Python) tricks
I tried using ngrok
I tried using face_recognition
I tried to paste
I tried using PySpark from Jupyter 4.x on EMR
I tried using PyCaret
I tried moving EfficientDet
I tried input interpolation on UE4 Python VS Code
I tried shell programming
I tried using Heapq
I tried using doctest
I tried running TensorFlow
I tried Auto Gluon
I tried using folium
I tried using jinja2