Categories
Mastering Development

NameError: name ‘all_df’ is not defined

#!/usr/bin/env python3 # -*- coding: utf-8 -*- “”” Created on Mon Aug 14 2017 Modified on Wed Aug 16 2017 Author: Yanfei Wu Get the past 500 S&P 500 stocks data “”” from bs4 import BeautifulSoup import requests from datetime import datetime import pandas as pd import pandas_datareader.data as web def get_ticker_and_sector(url=’https://en.wikipedia.org/wiki/List_of_S%26P_500_companies’): “”” get the […]