Every time I try to get ticker price using yFinance, it would print this comment:
JavaScript
x
2
1
[*********************100%***********************] 1 of 1 completed
2
Is there anyway to get rid of it?
JavaScript
1
2
1
data = yf.download(ticker, startDate.strftime("%Y-%m-%d"), endDate.strftime("%Y-%m-%d"))
2
Advertisement
Answer
The download method
JavaScript
1
5
1
def download(tickers, start=None, end=None, actions=False, threads=True,
2
group_by='column', auto_adjust=False, back_adjust=False,
3
progress=True, period="max", interval="1d", prepost=False,
4
proxy=None, rounding=False, **kwargs):
5
has an undocumented parameter called progress
that you should be able to set to False
to disable the progress bar.
Try changing your download call to:
JavaScript
1
3
1
data = yf.download(
2
ticker, startDate.strftime("%Y-%m-%d"), endDate.strftime("%Y-%m-%d"), progress=False)
3