Skip to content

Commit bd07e05

Browse files
authored
docs: fix typo for "population" in the GeminiTextGenerator.predict(..., output_schema={...}) sample notebook (#1748)
* docs: fix type in output_schema sample notebook * Update bq_dataframes_llm_output_schema.ipynb
1 parent 2bc4fbc commit bd07e05

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

notebooks/generative_ai/bq_dataframes_llm_output_schema.ipynb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
"cell_type": "markdown",
362362
"metadata": {},
363363
"source": [
364-
"You can also get float or int values, for example, to get polulations in millions:"
364+
"You can also get float or int values, for example, to get populations in millions:"
365365
]
366366
},
367367
{
@@ -400,7 +400,7 @@
400400
" <tr style=\"text-align: right;\">\n",
401401
" <th></th>\n",
402402
" <th>city</th>\n",
403-
" <th>polulation_million</th>\n",
403+
" <th>population_in_millions</th>\n",
404404
" </tr>\n",
405405
" </thead>\n",
406406
" <tbody>\n",
@@ -425,7 +425,7 @@
425425
"</div>[3 rows x 2 columns in total]"
426426
],
427427
"text/plain": [
428-
" city polulation_million\n",
428+
" city population_in_millions\n",
429429
"0 Seattle 0.75\n",
430430
"1 New York 19.68\n",
431431
"2 Shanghai 26.32\n",
@@ -439,8 +439,8 @@
439439
}
440440
],
441441
"source": [
442-
"result = gemini.predict(df, prompt=[\"what is the population in millions of\", df[\"city\"]], output_schema={\"polulation_million\": \"float64\"})\n",
443-
"result[[\"city\", \"polulation_million\"]]"
442+
"result = gemini.predict(df, prompt=[\"what is the population in millions of\", df[\"city\"]], output_schema={\"population_in_millions\": \"float64\"})\n",
443+
"result[[\"city\", \"population_in_millions\"]]"
444444
]
445445
},
446446
{
@@ -576,7 +576,7 @@
576576
" <th></th>\n",
577577
" <th>city</th>\n",
578578
" <th>is_US_city</th>\n",
579-
" <th>polulation_in_millions</th>\n",
579+
" <th>population_in_millions</th>\n",
580580
" <th>rainy_days_per_year</th>\n",
581581
" </tr>\n",
582582
" </thead>\n",
@@ -608,7 +608,7 @@
608608
"</div>[3 rows x 4 columns in total]"
609609
],
610610
"text/plain": [
611-
" city is_US_city polulation_in_millions rainy_days_per_year\n",
611+
" city is_US_city population_in_millions rainy_days_per_year\n",
612612
"0 Seattle True 0.75 152\n",
613613
"1 New York True 8.8 121\n",
614614
"2 Shanghai False 26.32 115\n",
@@ -622,8 +622,8 @@
622622
}
623623
],
624624
"source": [
625-
"result = gemini.predict(df, prompt=[df[\"city\"]], output_schema={\"is_US_city\": \"bool\", \"polulation_in_millions\": \"float64\", \"rainy_days_per_year\": \"int64\"})\n",
626-
"result[[\"city\", \"is_US_city\", \"polulation_in_millions\", \"rainy_days_per_year\"]]"
625+
"result = gemini.predict(df, prompt=[df[\"city\"]], output_schema={\"is_US_city\": \"bool\", \"population_in_millions\": \"float64\", \"rainy_days_per_year\": \"int64\"})\n",
626+
"result[[\"city\", \"is_US_city\", \"population_in_millions\", \"rainy_days_per_year\"]]"
627627
]
628628
},
629629
{
@@ -677,7 +677,7 @@
677677
" <th></th>\n",
678678
" <th>city</th>\n",
679679
" <th>is_US_city</th>\n",
680-
" <th>polulation_in_millions</th>\n",
680+
" <th>population_in_millions</th>\n",
681681
" <th>rainy_days_per_year</th>\n",
682682
" <th>places_to_visit</th>\n",
683683
" <th>gps_coordinates</th>\n",
@@ -717,7 +717,7 @@
717717
"</div>[3 rows x 6 columns in total]"
718718
],
719719
"text/plain": [
720-
" city is_US_city polulation_in_millions rainy_days_per_year \\\n",
720+
" city is_US_city population_in_millions rainy_days_per_year \\\n",
721721
"0 Seattle True 0.74 150 \n",
722722
"1 New York True 8.4 121 \n",
723723
"2 Shanghai False 26.32 115 \n",
@@ -741,8 +741,8 @@
741741
}
742742
],
743743
"source": [
744-
"result = gemini.predict(df, prompt=[df[\"city\"]], output_schema={\"is_US_city\": \"bool\", \"polulation_in_millions\": \"float64\", \"rainy_days_per_year\": \"int64\", \"places_to_visit\": \"array<string>\", \"gps_coordinates\": \"struct<latitude float64, longitude float64>\"})\n",
745-
"result[[\"city\", \"is_US_city\", \"polulation_in_millions\", \"rainy_days_per_year\", \"places_to_visit\", \"gps_coordinates\"]]"
744+
"result = gemini.predict(df, prompt=[df[\"city\"]], output_schema={\"is_US_city\": \"bool\", \"population_in_millions\": \"float64\", \"rainy_days_per_year\": \"int64\", \"places_to_visit\": \"array<string>\", \"gps_coordinates\": \"struct<latitude float64, longitude float64>\"})\n",
745+
"result[[\"city\", \"is_US_city\", \"population_in_millions\", \"rainy_days_per_year\", \"places_to_visit\", \"gps_coordinates\"]]"
746746
]
747747
}
748748
],

0 commit comments

Comments
 (0)