Is it possible to add .sleep() to this:
data = web.DataReader(ticker, 'yahoo', start, end)
I would like the sleep function to start every 10 seconds for a duration of 5 seconds. I want to do this because I think there is a problem with yahoo finance connection, which seems cuts out when I download bulk data. It works fine when I query just 1 symbol but gives and error such as
SymbolWarning: Failed to read symbol: 'BRK.B', replacing with NaN.
warnings.warn(msg.format(sym), SymbolWarning)
Full code :
start = datetime.date(2008,11,1)
end = datetime.date.today()
# df = web.get_data_yahoo(tickers, start, end)
df = web.DataReader(tickers, 'yahoo', start, end)

is it possibleis almost always yes. This question is vague and it's unclear what you want the sleeping to accomplish. You need to share more of your code for some solid answers, but as it stands, my suggestion is to puttime.sleep(10)at the bottom of whatever loop you're using to fetch values.