Jupyter(IPython)笔记本没有密谋

Kap*_*Pau 49 python ipython pandas

我安装了anaconda来使用pandas和scipy.我阅读和观看熊猫教程,他们都说要打开ipython笔记本

 ipython notebook --pylab==inline
Run Code Online (Sandbox Code Playgroud)

但当我这样做时,我收到一条消息说

"Support for specifying --pylab on the command line has been removed. Please use '%pylab = inline' or '%matplotlib =inline' in the notebook itself"
Run Code Online (Sandbox Code Playgroud)

但这不起作用.然后,当我尝试"plot(arange(10))"时,我收到一条消息"没有定义名称'情节'." 我试图从.csv文件中绘制数据并获得

"matplotlib.axes._subplots.AxesSubplot at 0xebf8b70".
Run Code Online (Sandbox Code Playgroud)

我该怎么办?

AZh*_*hao 123

我相信当他们从IPython转换到更普通的Jupyter笔记本时,pylab魔术被删除了.

尝试:

%matplotlib inline
Run Code Online (Sandbox Code Playgroud)

当你收到如下消息时:

"matplotlib.axes._subplots.AxesSubplot at 0xebf8b70".
Run Code Online (Sandbox Code Playgroud)

那只是显示对象的IPython.你需要指定IPython显示它.因此matplotlib内联魔术.

  • %matplotlib内联为我工作 (5认同)