The url used for data extraction for the weight prediction model from Chapter 1 changed from http://wiki.stat.ucla.edu/socr/index.php/SOCR_Data_Dinov_020108_HeightsWeights to http://socr.ucla.edu/docs/resources/SOCR_Data/SOCR_Data_Dinov_020108_HeightsWeights.html , and the data table is no longer the 2nd in the HTML.
The 3rd cell of the .pynb code for chapter one also need to be modified to deal with the table format:
url = 'http://socr.ucla.edu/docs/resources/SOCR_Data/SOCR_Data_Dinov_020108_HeightsWeights.html' # updated url
df = pd.read_html(url)[0]
df.columns = df.iloc[0]
height_weight_df = df.drop(df.index[0])[['Height(Inches)','Weight(Pounds)']]
height_weight_df['Height(Inches)'] = height_weight_df['Height(Inches)'].astype(float)
height_weight_df['Weight(Pounds)'] = height_weight_df['Weight(Pounds)'].astype(float)
The url used for data extraction for the weight prediction model from Chapter 1 changed from http://wiki.stat.ucla.edu/socr/index.php/SOCR_Data_Dinov_020108_HeightsWeights to http://socr.ucla.edu/docs/resources/SOCR_Data/SOCR_Data_Dinov_020108_HeightsWeights.html , and the data table is no longer the 2nd in the HTML.
The 3rd cell of the .pynb code for chapter one also need to be modified to deal with the table format: