Feb-12-2021, 07:32 AM
Stock tickers are returned as a list. So there is no need to use pandas if only requirement is to write tickers into file, vanilla Python is good enough.
Following code creates combined list of tickers and writes list into file so that every ticker is on separate line:
Following code creates combined list of tickers and writes list into file so that every ticker is on separate line:
tickers = [*si.tickers_nasdaq(), *si.tickers_other()] with open('tickers.csv', 'w') as f: print(*tickers, sep='\n', file=f)
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.