安裝相關(guān)的python庫
pip install jupyter
pip install pandas # this will include numpy lib
pip install matplotlib
安裝visual studio code插件
python插件
jupyter插件
簡單示例
# %%
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
ts = pd.Series(np.random.randn(1000), index=pd.date_range('1/1/2000', periods=1000))
ts = ts.cumsum()
ts.plot()
在代碼中插入#%%绿鸣,會在vs code中顯示如下的Run cell按鈕。點(diǎn)擊Run cell暂氯,便會啟動jupyter notebook,顯示結(jié)果潮模。
運(yùn)行結(jié)果: