【发布时间】:2016-06-06 06:59:23
【问题描述】:
我有一个简单的熊猫数据框。尝试从 IPython 的 Windows 10 终端会话中绘图给了我这个:
In [4]: df = pd.DataFrame({'Y':[1, 3, 5, 7, 9], 'X':[0, 2, 4, 6, 8]})
In [5]: df
Out[5]:
X Y
0 0 1
1 2 3
2 4 5
3 6 7
4 8 9
In [6]: df.plot(kind='line')
Out[6]: <matplotlib.axes._subplots.AxesSubplot at 0x26c4d366940>
In [7]:
我看不到任何情节。是不是我做错了什么?
【问题讨论】:
-
你需要
plt.show()
标签: python pandas matplotlib ipython interactive