【发布时间】:2017-06-13 09:38:01
【问题描述】:
import pandas as pd
import matplotlib.pyplot as plt
file = 'd:\\a\\pandas\\test.xlsx'
data = pd.ExcelFile(file)
df1 = data.parse('Link')
df2 = df1[['dataFor', 'total']]
df2
返回:
print (type(df2))
告诉我
class 'pandas.core.frame.DataFrame'
尝试
df2.plot(kind='line')
返回
matplotlib.axes._subplots.AxesSubplot at 0xe4241d0
可能是环境吗?
Jupyter notebook > Help > About
The version of the notebook server is 4.2.3 and is running on:
Python 3.5.2 |Anaconda 4.2.0 (32-bit)| (default, Jul 5 2016, 11:45:57) [MSC v.1900 32 bit (Intel)]
错在哪里? matplotlib 仍然是标准还是初学者应该选择 Bokeh 或两者兼而有之?
【问题讨论】:
-
这一切都很好并且按预期工作。究竟是什么问题?你会期待什么,会发生什么?
-
我在 0xe4241d0 处收到 matplotlib.axes._subplots.AxesSubplot 消息,但 jupyter 笔记本中没有显示任何图形。
-
我不推荐散景,除非你已经知道你只会制作网络图形。
标签: python pandas matplotlib bokeh