Skip to content

Commit

Permalink
Merge pull request FinanceData#56 from radishgreens/master
Browse files Browse the repository at this point in the history
FIX: wiki S&P500 listing
  • Loading branch information
FinanceData authored Dec 18, 2020
2 parents 0a45956 + 59ff3ba commit 2a6bd64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wikipedia/listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def __init__(self, market):
def read(self):
url = 'https://en.wikipedia.org/wiki/List_of_S&P_500_companies'
df = pd.read_html(url, header=0)[0]
cols_ren = {'Security':'Name', 'Ticker symbol':'Symbol', 'GICS Sector':'Sector', 'GICS Sub Industry':'Industry'}
cols_ren = {'Security':'Name', 'GICS Sector':'Sector', 'GICS Sub-Industry':'Industry'}
df = df.rename(columns = cols_ren)
df = df[['Symbol', 'Name', 'Sector', 'Industry']]
df['Symbol'] = df['Symbol'].str.replace('\.', '')
Expand Down

0 comments on commit 2a6bd64

Please sign in to comment.