2
A
回答
0
你需要情节列A
只,指数在Series.plot
用于x
和值y
默认:
#line is default method, so omitted
Test['A'].plot(style='o')
另一种解决方案是reset_index
从index
列,然后DataFrame.plot
:
Test.reset_index().plot(x='index', y='A', style='o')
样品:
Test=pd.DataFrame({'A':[3.0,4,5,10], 'B':[3.0,4,5,9]})
print (Test)
A B
0 3.0 3.0
1 4.0 4.0
2 5.0 5.0
3 10.0 9.0
Test['A'].plot(style='o')
print (Test.reset_index())
index A B
0 0 3.0 3.0
1 1 4.0 4.0
2 2 5.0 5.0
3 3 10.0 9.0
Test.reset_index().plot(x='index', y='A', style='o')
相关问题
- 1. 将值添加到DataFrame Python 3.0
- 2. 从Dataframe的列(python/pandas)绘制多行?
- 3. 绘制Apache DataFrame
- 4. 熊猫dataframe:如何绘制烛台
- 5. 如何查找Python DataFrame列中的值?
- 6. 如何在python中绘制函数值
- 7. 在Python中绘制值
- 8. 如何绘制以下值
- 9. Pandas Dataframe将行绘制为x值并将列标题绘制为y值
- 10. 在seaborn中绘制两列dataFrame
- 11. 如何绘制python中的特征谱?
- 12. 如何绘制Python中的半椭圆?
- 13. python .csv to pandas dataframe绘制散景的蜡烛图
- 14. 从DataFrame问题绘制结果(散点图)。 Python的
- 15. 如何绘制并在Python
- 16. 如何绘制熊猫Python
- 17. 如何绘制在python
- 18. 绘制DataFrame聚合后的特定列
- 19. 如何绘制JQPlot条形图中的十进制值?
- 20. 如何计算dataframe pandas-python中的值的条件概率?
- 21. 如何用python中的DataFrame列的模式替换NA值?
- 22. 绘制在Python
- 23. 如何绘制R中abline的值?
- 24. 如何绘制javafx中的峰值图
- 25. 如何拆分python中的DataFrame列
- 26. 比较python中的dataframe列值
- 27. 如何在Python中绘制3D地球?
- 28. 如何在python中绘制cdf
- 29. 如何在Python中绘制网格图?
- 30. 如何在Python中绘制9x9网格
非常感谢您的帮助。如果我想让y轴从0运行到10,我该怎么做? – user234568
您需要'ax = Test ['A']。plot(style ='o')' 'ax.set_ylim(0,10)' - 参见[here](https://stackoverflow.com/questions/17787366 /设定-y轴合matplotlib-使用-大熊猫) – jezrael