Skip to content

docs: fix typo for "population" in the GeminiTextGenerator.predict(..., output_schema={...}) sample notebook #1748

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
26 changes: 13 additions & 13 deletions notebooks/generative_ai/bq_dataframes_llm_output_schema.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You can also get float or int values, for example, to get polulations in millions:"
"You can also get float or int values, for example, to get populations in millions:"
]
},
{
Expand Down Expand Up @@ -400,7 +400,7 @@
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>city</th>\n",
" <th>polulation_million</th>\n",
" <th>population_in_millions</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
Expand All @@ -425,7 +425,7 @@
"</div>[3 rows x 2 columns in total]"
],
"text/plain": [
" city polulation_million\n",
" city population_in_millions\n",
"0 Seattle 0.75\n",
"1 New York 19.68\n",
"2 Shanghai 26.32\n",
Expand All @@ -439,8 +439,8 @@
}
],
"source": [
"result = gemini.predict(df, prompt=[\"what is the population in millions of\", df[\"city\"]], output_schema={\"polulation_million\": \"float64\"})\n",
"result[[\"city\", \"polulation_million\"]]"
"result = gemini.predict(df, prompt=[\"what is the population in millions of\", df[\"city\"]], output_schema={\"population_in_millions\": \"float64\"})\n",
"result[[\"city\", \"population_in_millions\"]]"
]
},
{
Expand Down Expand Up @@ -576,7 +576,7 @@
" <th></th>\n",
" <th>city</th>\n",
" <th>is_US_city</th>\n",
" <th>polulation_in_millions</th>\n",
" <th>population_in_millions</th>\n",
" <th>rainy_days_per_year</th>\n",
" </tr>\n",
" </thead>\n",
Expand Down Expand Up @@ -608,7 +608,7 @@
"</div>[3 rows x 4 columns in total]"
],
"text/plain": [
" city is_US_city polulation_in_millions rainy_days_per_year\n",
" city is_US_city population_in_millions rainy_days_per_year\n",
"0 Seattle True 0.75 152\n",
"1 New York True 8.8 121\n",
"2 Shanghai False 26.32 115\n",
Expand All @@ -622,8 +622,8 @@
}
],
"source": [
"result = gemini.predict(df, prompt=[df[\"city\"]], output_schema={\"is_US_city\": \"bool\", \"polulation_in_millions\": \"float64\", \"rainy_days_per_year\": \"int64\"})\n",
"result[[\"city\", \"is_US_city\", \"polulation_in_millions\", \"rainy_days_per_year\"]]"
"result = gemini.predict(df, prompt=[df[\"city\"]], output_schema={\"is_US_city\": \"bool\", \"population_in_millions\": \"float64\", \"rainy_days_per_year\": \"int64\"})\n",
"result[[\"city\", \"is_US_city\", \"population_in_millions\", \"rainy_days_per_year\"]]"
]
},
{
Expand Down Expand Up @@ -677,7 +677,7 @@
" <th></th>\n",
" <th>city</th>\n",
" <th>is_US_city</th>\n",
" <th>polulation_in_millions</th>\n",
" <th>population_in_millions</th>\n",
" <th>rainy_days_per_year</th>\n",
" <th>places_to_visit</th>\n",
" <th>gps_coordinates</th>\n",
Expand Down Expand Up @@ -717,7 +717,7 @@
"</div>[3 rows x 6 columns in total]"
],
"text/plain": [
" city is_US_city polulation_in_millions rainy_days_per_year \\\n",
" city is_US_city population_in_millions rainy_days_per_year \\\n",
"0 Seattle True 0.74 150 \n",
"1 New York True 8.4 121 \n",
"2 Shanghai False 26.32 115 \n",
Expand All @@ -741,8 +741,8 @@
}
],
"source": [
"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",
"result[[\"city\", \"is_US_city\", \"polulation_in_millions\", \"rainy_days_per_year\", \"places_to_visit\", \"gps_coordinates\"]]"
"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",
"result[[\"city\", \"is_US_city\", \"population_in_millions\", \"rainy_days_per_year\", \"places_to_visit\", \"gps_coordinates\"]]"
]
}
],
Expand Down