【发布时间】:2018-04-05 10:42:09
【问题描述】:
我正在尝试使用 Jupyter 笔记本绘制一个简单的折线图,使用一列作为索引,另一列作为一列。我试过了:
dataframe.set_index('Year'),['AUD'].plot()
这会导致'list' object has no attribute 'plot' 错误。
我可以使用Year 作为索引创建一个新的数据框,然后绘制AUD,但是我可以在简单地绘制一行时获得一些帮助吗?
【问题讨论】:
-
你有语法错误,去掉逗号:
dataframe.set_index('Year'),['AUD'].plot()-->dataframe.set_index('Year')['AUD'].plot() -
谢谢大家!!!!!!
标签: python pandas dataframe jupyter-notebook