user6457870
user6457870

Reputation: 247

Plot a row in Panda/Python

I know it can look basic but I didnt find anything about it...

In panda I have a dataframe with one row only. the index is a date and the columns are the date, the data are regular figures...

I want to plot all the row... any idea?

            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  

Upvotes: 3

Views: 2651

Answers (1)

Serenity
Serenity

Reputation: 36635

You have to select a row by it index and then plot:

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

enter image description here

Upvotes: 4

Related Questions