【发布时间】:2020-07-08 11:40:31
【问题描述】:
这是我编码的:
def statement(ticker,statement):
if statement =='IS':
temp='income-statement'
elif statement =='BS':
temp='balance-sheet-statement'
else:
temp='cash-flow-statement'
df = tickers.temp(frequency='q')
return df
tickers=['AAPL','GOOG','TSLA']
我希望函数中的 temp 替换 df = tickers.temp(frequency='q') 并最终在我用股票代码替换股票代码时给我正确的财务报表。如果有人有类似的合适代码,请在下面发布
【问题讨论】: