For the first feature, we will create a feature that tells us if the home team is generally better than the visitors. To do this, we will load the standings (also called a ladder in some sports) from the NBA in the previous season. A team will be considered better if it ranked higher in 2015 than the other team.
To obtain the standings data, perform the following steps:
- Navigate to http://www.basketball-reference.com/leagues/NBA_2015_standings.html in your web browser.
- Select Expanded Standings to get a single list for the entire league.
- Click on the Export link.
- Copy the text and save it in a text/CSV file called standings.csv in your data folder.
Back in your Jupyter Notebook, enter the following lines into a new ...