New answers tagged

1

I found one source that has the data as an html table. https://www.slickcharts.com/sp500 You can use pandas to parse the html table as a dataframe, and then write a csv: import pandas as pd import requests df = pd.read_html(requests.get('https://www.slickcharts.com/sp500', headers={'User-agent': 'Mozilla/5.0'}).text)[0] print(df) df....


Top 50 recent answers are included