@@ -139,11 +139,11 @@ def test_jupyter_tutorial(ipython):
139139 pivot_table .plot (kind = 'bar' , stacked = True , figsize = (15 , 7 ));
140140 # [END bigquery_jupyter_plot_plurality_by_year]
141141
142- # [START bigquery_jupyter_query_weight_by_gestation ]
142+ # [START bigquery_jupyter_query_births_by_gestation ]
143143 sql = """
144144 SELECT
145145 gestation_weeks,
146- AVG(weight_pounds ) AS ave_weight
146+ COUNT(1 ) AS count
147147 FROM
148148 `bigquery-public-data.samples.natality`
149149 WHERE
@@ -154,12 +154,11 @@ def test_jupyter_tutorial(ipython):
154154 gestation_weeks
155155 """
156156 df = client .query (sql ).to_dataframe ()
157- # [END bigquery_jupyter_query_weight_by_gestation ]
157+ # [END bigquery_jupyter_query_births_by_gestation ]
158158
159- # [START bigquery_jupyter_plot_weight_by_gestation]
160- ax = df .plot (
161- kind = 'bar' , x = 'gestation_weeks' , y = 'ave_weight' , figsize = (15 , 7 ))
162- ax .set_title ('Average Weight by Gestation Weeks' )
159+ # [START bigquery_jupyter_plot_births_by_gestation]
160+ ax = df .plot (kind = 'bar' , x = 'gestation_weeks' , y = 'count' , figsize = (15 ,7 ))
161+ ax .set_title ('Count of Births by Gestation Weeks' )
163162 ax .set_xlabel ('Gestation Weeks' )
164- ax .set_ylabel ('Average Weight ' );
165- # [END bigquery_jupyter_plot_weight_by_gestation ]
163+ ax .set_ylabel ('Count ' );
164+ # [END bigquery_jupyter_plot_births_by_gestation ]
0 commit comments