我试图在单列数据帧上使用matplotlib中的散点视图,如下所示:
uva1pd.plot(kind='scatter', y='RESULT')
这是数据帧:
RESULT
0 2009.13
1 1999.19
2 2014.34
3 1987.51
4 1987.51
.. ...
475 1999.35
476 1987.51
477 1993.19
478 1993.19
479 1982.62
但是,我得到以下错误:
An error was encountered:
scatter requires an x and y column
有没有办法只使用matplotlib中数据帧索引的默认行数
您只需定义一个长度等于y列的伪x变量-
这里有一种方法,你不需要定义一个新的变量
相关问题 更多 >
编程相关推荐