Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect pandas API for referenced version and update data URL #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# This repo "github.com/datasets/s-and-p-500-companies" has some other information about
# S & P 500 companies.
SP500_LIST_URL = "https://raw.githubusercontent.com/datasets/s-and-p-500-companies/master/data/constituents-financials.csv"
SP500_LIST_URL = "https://raw.githubusercontent.com/datasets/s-and-p-companies-financials/master/data/constituents-financials.csv"
SP500_LIST_PATH = os.path.join(DATA_DIR, "constituents-financials.csv")


Expand All @@ -35,7 +35,7 @@ def _download_sp500_list():
def _load_symbols():
_download_sp500_list()
df_sp500 = pd.read_csv(SP500_LIST_PATH)
df_sp500.sort('Market Cap', ascending=False, inplace=True)
df_sp500.sort_values('Market Cap', ascending=False, inplace=True)
stock_symbols = df_sp500['Symbol'].unique().tolist()
print "Loaded %d stock symbols" % len(stock_symbols)
return stock_symbols
Expand Down
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BeautifulSoup==3.2.1
numpy==1.13.1
pandas==0.16.2
scikit-learn==0.16.1
scipy==0.19.1
urllib3==1.8