如何从字典中提取值(雅虎财务检索表)以用于公式?

时间:2019-06-12 18:23:49

标签: dictionary yahoo-finance

我想使用从Yahoofinance(python 3)检索到的值形式字典来为我的公式计算DCF。

为此,我需要从Yahoofinance检索的字典中显示的“运营现金流量”数据,但是我无法获取运营现金流量的值。

我正在使用Mac。

我尝试了以下公式:

stm = yahoo_financials.get_financial_stmts('annual', 'cash')

它返回字典,但是当我想使用公式stm ['操作现金流量']获取特定名称(例如“操作现金流量”)的值时,它不返回值。您能帮忙为什么索引不起作用以及如何在我的计算中获得价值吗?

from yahoofinancials import YahooFinancials
tickers = [input()]

yahoo_financials = YahooFinancials(tickers)

new_data = pd.DataFrame()

for t in tickers :
    new_data[t] = wb.DataReader(t, data_source ='yahoo', start = '2009-1-1')['Adj Close']

stm = yahoo_financials.get_financial_stmts('annual', 'cash')
stm[t]['operation cash flow']

没有结果返回

0 个答案:

没有答案