I want to compile a list of the stocks that fit the criteria I set. I am looking at companies that have a market cap between $150,000 and $10,000,000 (in millions). When running the code below I am getting an error. I want to know what exactly I am doing wrong
''' import yfinance as yf, pandas as pd, shutil, os, time, glob, smtplib, ssl from get_all_tickers import get_tickers as gt
tickers = gt.get_tickers_filtered(mktcap_min=150000, mktcap_max=10000000)
print("The amount of stocks chosen to observe: " + str(len(tickers)))
'''
Additional Data:
runfile('A:/Misc Financial Docs/stocks_data/OBV_Email.py', wdir='A:/Misc Financial Docs/stocks_data') Traceback (most recent call last):
File "A:\Misc Financial Docs\stocks_data\OBV_Email.py", line 13, in tickers = gt.get_tickers_filtered(mktcap_min=150000, mktcap_max=10000000)
File "c:\users\aos82\appdata\local\programs\python\python39\lib\site-packages\get_all_tickers\get_tickers.py", line 84, in get_tickers_filtered tickers_list.extend(__exchange2list_filtered(exchange, mktcap_min=mktcap_min, mktcap_max=mktcap_max, sectors=sectors))
File "c:\users\aos82\appdata\local\programs\python\python39\lib\site-packages\get_all_tickers\get_tickers.py", line 145, in __exchange2list_filtered df = __exchange2df(exchange)
File "c:\users\aos82\appdata\local\programs\python\python39\lib\site-packages\get_all_tickers\get_tickers.py", line 134, in __exchange2df df = pd.read_csv(data, sep=",")
File "c:\users\aos82\appdata\local\programs\python\python39\lib\site-packages\pandas\io\parsers.py", line 605, in read_csv return _read(filepath_or_buffer, kwds)
File "c:\users\aos82\appdata\local\programs\python\python39\lib\site-packages\pandas\io\parsers.py", line 463, in _read return parser.read(nrows)
File "c:\users\aos82\appdata\local\programs\python\python39\lib\site-packages\pandas\io\parsers.py", line 1052, in read index, columns, col_dict = self._engine.read(nrows)
File "c:\users\aos82\appdata\local\programs\python\python39\lib\site-packages\pandas\io\parsers.py", line 2056, in read data = self._reader.read(nrows)
File "pandas_libs\parsers.pyx", line 756, in pandas._libs.parsers.TextReader.read
File "pandas_libs\parsers.pyx", line 771, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas_libs\parsers.pyx", line 827, in pandas._libs.parsers.TextReader._read_rows
File "pandas_libs\parsers.pyx", line 814, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas_libs\parsers.pyx", line 1951, in pandas._libs.parsers.raise_parser_error
ParserError: Error tokenizing data. C error: Expected 1 fields in line 23, saw 4