我试图使用nsepy获取股票历史记录。 get_history()调用返回所有符号的历史记录,除了' PVR',这是空的。
这是代码
PVR = get_history(symbol='PVR',
start=date(2018,5,1),
end=date(2018,5,10))
print(PVR)
给出输出
Empty DataFrame
Columns: [Symbol, Series, Prev Close, Open, High, Low, Last, Close, VWAP, Volume, Turnover, Trades, Deliverable Volume, %Deliverble]
Index: []
答案 0 :(得分:1)
在小写的'pvr'中使用符号。 尝试以下代码:
PVR = get_history(symbol='pvr',
start=date(2018,5,1),
end=date(2018,5,10))
print(PVR)
这对我有用。