Skip to content

Commit e8dfb71

Browse files
Merge pull request #290854 from v-thepet/patch-64
Update overview-cognitive-services.md
2 parents 82bc5b9 + e05f261 commit e8dfb71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/synapse-analytics/machine-learning/overview-cognitive-services.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ display(
479479

480480
## Get information from arbitrary web APIs
481481

482-
With HTTP on Spark, any web service can be used in your big data pipeline. In this example, we use the [World Bank API](http://api.worldbank.org/v2/country/) to get information about various countries around the world.
482+
With HTTP on Spark, any web service can be used in your big data pipeline. In this example, we use the [World Bank API](http://api.worldbank.org/v2/country/) to get information about various countries/regions around the world.
483483

484484
```python
485485
# Use any requests from the python requests library
@@ -489,7 +489,7 @@ def world_bank_request(country):
489489
"GET", "http://api.worldbank.org/v2/country/{}?format=json".format(country)
490490
)
491491

492-
# Create a dataframe with specifies which countries we want data on
492+
# Create a dataframe with specifies which countries/regions we want data on
493493
df = spark.createDataFrame([("br",), ("usa",)], ["country"]).withColumn(
494494
"request", http_udf(world_bank_request)(col("country"))
495495
)
@@ -504,7 +504,7 @@ client = (
504504
def get_response_body(resp):
505505
return resp.entity.content.decode()
506506

507-
# Show the details of the country data returned
507+
# Show the details of the country/region data returned
508508
display(
509509
client.transform(df).select(
510510
"country", udf(get_response_body)(col("response")).alias("response")

0 commit comments

Comments
 (0)