Skip to content

Commit

Permalink
fix) fix typos in example notebook
Browse files Browse the repository at this point in the history
- Update display function to display rev_geocoder output
  • Loading branch information
Sudhindra Kovalam authored and mhamilton723 committed Jan 12, 2022
1 parent 4aaee7b commit 822de4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
"metadata": {},
"outputs": [],
"source": [
"res = request.delete(f\"https://{url_geo_prefix}.atlas.microsoft.com/mapData/{user_data_id}?api-version=1.0&subscription-key={azureMapsKey}\")"
"res = requests.delete(f\"https://{url_geo_prefix}.atlas.microsoft.com/mapData/{user_data_id}?api-version=1.0&subscription-key={azureMapsKey}\")"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,11 @@
" .setOutputCol(\"output\"))\n",
"\n",
"# Show the results of your text query in a table format\n",
"display(rev_geocoder.transform(df).select(\"address\", col(\n",
" \"output.response.results\")[0].alias(\"output\")))"
"\n",
"display(rev_geocoder.transform(FixedMiniBatchTransformer().setBatchSize(10).transform(df)).select(col(\"*\"),\n",
" col(\"output.response.addresses\").getItem(0).getField(\"address\").getField(\"freeformAddress\").alias(\"In Polygon\"),\n",
" col(\"output.response.addresses\").getItem(0).getField(\"address\").getField(\"country\").alias(\"Intersecting Polygons\")\n",
" ).drop(\"output\"))\n"
]
},
{
Expand Down Expand Up @@ -298,7 +301,7 @@
"metadata": {},
"outputs": [],
"source": [
"res = request.delete(f\"https://{url_geo_prefix}.atlas.microsoft.com/mapData/{user_data_id}?api-version=1.0&subscription-key={azureMapsKey}\")"
"res = requests.delete(f\"https://{url_geo_prefix}.atlas.microsoft.com/mapData/{user_data_id}?api-version=1.0&subscription-key={azureMapsKey}\")"
]
}
],
Expand Down

0 comments on commit 822de4c

Please sign in to comment.