Sort Columns by assigned column
Sort Columns by assigned column Question: I have a following code: import bs4 as bs import requests import yfinance as yf import datetime import pandas as pd import time starttimer = time.time() resp = requests.get(‘http://en.wikipedia.org/wiki/List_of_S%26P_500_companies’) soup = bs.BeautifulSoup(resp.text, ‘lxml’) table = soup.find(‘table’, {‘class’: ‘wikitable sortable’}) tickers = [] for row in table.findAll(‘tr’)[1:]: ticker = row.findAll(‘td’)[0].text …