|
361 | 361 | "cell_type": "markdown",
|
362 | 362 | "metadata": {},
|
363 | 363 | "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:" |
365 | 365 | ]
|
366 | 366 | },
|
367 | 367 | {
|
|
400 | 400 | " <tr style=\"text-align: right;\">\n",
|
401 | 401 | " <th></th>\n",
|
402 | 402 | " <th>city</th>\n",
|
403 |
| - " <th>polulation_million</th>\n", |
| 403 | + " <th>population_in_millions</th>\n", |
404 | 404 | " </tr>\n",
|
405 | 405 | " </thead>\n",
|
406 | 406 | " <tbody>\n",
|
|
425 | 425 | "</div>[3 rows x 2 columns in total]"
|
426 | 426 | ],
|
427 | 427 | "text/plain": [
|
428 |
| - " city polulation_million\n", |
| 428 | + " city population_in_millions\n", |
429 | 429 | "0 Seattle 0.75\n",
|
430 | 430 | "1 New York 19.68\n",
|
431 | 431 | "2 Shanghai 26.32\n",
|
|
439 | 439 | }
|
440 | 440 | ],
|
441 | 441 | "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\"]]" |
444 | 444 | ]
|
445 | 445 | },
|
446 | 446 | {
|
|
576 | 576 | " <th></th>\n",
|
577 | 577 | " <th>city</th>\n",
|
578 | 578 | " <th>is_US_city</th>\n",
|
579 |
| - " <th>polulation_in_millions</th>\n", |
| 579 | + " <th>population_in_millions</th>\n", |
580 | 580 | " <th>rainy_days_per_year</th>\n",
|
581 | 581 | " </tr>\n",
|
582 | 582 | " </thead>\n",
|
|
608 | 608 | "</div>[3 rows x 4 columns in total]"
|
609 | 609 | ],
|
610 | 610 | "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", |
612 | 612 | "0 Seattle True 0.75 152\n",
|
613 | 613 | "1 New York True 8.8 121\n",
|
614 | 614 | "2 Shanghai False 26.32 115\n",
|
|
622 | 622 | }
|
623 | 623 | ],
|
624 | 624 | "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\"]]" |
627 | 627 | ]
|
628 | 628 | },
|
629 | 629 | {
|
|
677 | 677 | " <th></th>\n",
|
678 | 678 | " <th>city</th>\n",
|
679 | 679 | " <th>is_US_city</th>\n",
|
680 |
| - " <th>polulation_in_millions</th>\n", |
| 680 | + " <th>population_in_millions</th>\n", |
681 | 681 | " <th>rainy_days_per_year</th>\n",
|
682 | 682 | " <th>places_to_visit</th>\n",
|
683 | 683 | " <th>gps_coordinates</th>\n",
|
|
717 | 717 | "</div>[3 rows x 6 columns in total]"
|
718 | 718 | ],
|
719 | 719 | "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", |
721 | 721 | "0 Seattle True 0.74 150 \n",
|
722 | 722 | "1 New York True 8.4 121 \n",
|
723 | 723 | "2 Shanghai False 26.32 115 \n",
|
|
741 | 741 | }
|
742 | 742 | ],
|
743 | 743 | "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\"]]" |
746 | 746 | ]
|
747 | 747 | }
|
748 | 748 | ],
|
|
0 commit comments