From fa0806399f778a36ab827cfe5040cc4454c5edfa Mon Sep 17 00:00:00 2001 From: Marcelo Eden Date: Wed, 24 May 2023 15:34:56 -0700 Subject: [PATCH] Fix tickers_sp500 --- yahoo_fin/stock_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yahoo_fin/stock_info.py b/yahoo_fin/stock_info.py index 8764761..43578ab 100644 --- a/yahoo_fin/stock_info.py +++ b/yahoo_fin/stock_info.py @@ -127,7 +127,7 @@ def tickers_sp500(include_company_data = False): '''Downloads list of tickers currently listed in the S&P 500 ''' # get list of all S&P 500 stocks sp500 = pd.read_html("https://en.wikipedia.org/wiki/List_of_S%26P_500_companies")[0] - sp500["Symbol"] = sp500["Symbol"].str.replace(".", "-", regex=True) + sp500["Symbol"] = sp500["Symbol"].str.replace(".", "-") if include_company_data: return sp500