0

Can someone please help me to understand the structure of the data frame I am receiving from a function call and also share how can I access a particular cell value in that data frame?

Following is the output when I print resultData.shape

(0, 14)

(22, 14)

Following is the output when I print resultData

(0, 14)

Empty DataFrame

Columns: [Symbol, Series, Prev Close, Open, High, Low, Last, Close, VWAP, Volume, Turnover, Trades, Deliverable Volume, %Deliverble]

Index: []
(22, 14)

             Symbol Series  Prev Close     Open     High      Low     Last  \
Date                                                                       
2018-01-01    ACC     EQ     1758.40  1763.95  1763.95  1725.00  1731.40   
2018-01-02    ACC     EQ     1731.35  1736.20  1745.80  1725.00  1739.00   
2018-01-03    ACC     EQ     1743.20  1741.10  1780.00  1740.10  1780.00   
2018-01-04    ACC     EQ     1774.60  1779.95  1808.00  1770.00  1794.50   

I need to access 'Open' price on 2018-01-01.

Thanks in advance!

4

1 回答 1

0

指示的数据框具有数据类型 datatime.date 的索引和表示的列 [Symbol, Series, Prev Close, Open, High, Low, Last, Close, VWAP, Volume, Turnover, Trades, Deliverable Volume, %Deliverble]

要访问日期 2018-01-01 的“打开”值,请使用以下语句

格式:dataframe.loc[行,列]

resultData.loc[日期(2018,1,1),'打开']

于 2018-04-17T16:36:42.947 回答