简体   繁体   中英

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  

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

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

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM