在Panda / Python中绘制一行

时间:2017-04-01 03:00:23

标签: python pandas plot row

我知道它看起来很基本,但我找不到任何关于它的东西......

在熊猫中我有一个只有一行的数据帧。索引是日期,列是日期,数据是常规数字......

我想绘制所有行...任何想法?

            2017-03-23  2017-03-22  2017-03-21  2017-03-20  2017-03-17  2017-03-16  
maturity                                                                       
2020-04-30       41       -20         15.3         21.21       -0.86        61.2  

1 个答案:

答案 0 :(得分:1)

您必须按索引选择一行,然后绘制:

row = df.iloc[0]
row.plot()

enter image description here