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.
--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)
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.
Put Python in VSCode Extension
Execute the following command of VSCode to select the Python module to be used in the operation.
Select Interpreter

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

## 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

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

Baseball scoreboard! (Excuse me)
Recommended Posts