Skip to content

Commit

Permalink
Merge pull request #108 from 3den/master
Browse files Browse the repository at this point in the history
Fix tickers_sp500
  • Loading branch information
atreadw1492 authored Jun 15, 2023
2 parents 180e1ef + fa08063 commit cecc32e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yahoo_fin/stock_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cecc32e

Please sign in to comment.