diff --git a/api/python/query.md b/api/python/query.md index 4e0028941..2b354715a 100644 --- a/api/python/query.md +++ b/api/python/query.md @@ -69,7 +69,7 @@ their DCIDs [California](https://datacommons.org/browser/geoId/06>), ... ?a dcid ?dcid ... } ... ''' ->>> result = query(query_str) +>>> result = dc.query(query_str) >>> for r in result: ... print(r) {"?name": "Maryland", "?dcid": "geoId/24"} @@ -82,7 +82,7 @@ like so. The following returns all rows where the name is "Maryland": ```python >>> selector = lambda row: row['?name'] == 'Maryland' ->>> result = query(query_str, select=selector) +>>> result = dc.query(query_str, select=selector) >>> for r in result: ... print(r) {"?name": "Maryland", "?dcid": "geoId/24"} diff --git a/api/python/stat_series.md b/api/python/stat_series.md index 461ab0b20..506efcf5f 100644 --- a/api/python/stat_series.md +++ b/api/python/stat_series.md @@ -56,7 +56,7 @@ In the next example, the parameter "observation=P3Y" overly constrains the reque throws ValueError: ```python ->>> get_stat_series('geoId/06085', 'Count_Person', observation_period='P3Y') +>>> dc.get_stat_series('geoId/06085', 'Count_Person', observation_period='P3Y') >>> Traceback (most recent call last): ... raise ValueError('No data in response.') diff --git a/api/python/stat_value.md b/api/python/stat_value.md index 15399fee0..11c600950 100644 --- a/api/python/stat_value.md +++ b/api/python/stat_value.md @@ -60,7 +60,7 @@ In next example, the parameter "observation=P3Y" overly constrains the request s throws ValueError: ```python ->>> get_stat_value('geoId/06085', 'Count_Person', observation_period='P3Y') +>>> dc.get_stat_value('geoId/06085', 'Count_Person', observation_period='P3Y') >>> Traceback (most recent call last): ... raise ValueError('No data in response.') diff --git a/api/python/stats.md b/api/python/stats.md index dcf9e9a63..5d4f57516 100644 --- a/api/python/stats.md +++ b/api/python/stats.md @@ -78,4 +78,4 @@ and [Santa Clara County](https://datacommons.org/browser/geoId/06085). } } } -``` \ No newline at end of file +``` diff --git a/api/python/triple.md b/api/python/triple.md index 649568ffb..8bc90781e 100644 --- a/api/python/triple.md +++ b/api/python/triple.md @@ -50,7 +50,7 @@ We would like to get one triple per property and type combination associated wit ```python >>> import datacommons as dc >>> dc.set_api_key(YOUR_API_KEY_HERE) ->>> get_triples(['geoId/06'], limit=1) +>>> dc.get_triples(['geoId/06'], limit=1) { 'geoId/06': [ ('geoId/0653', 'containedInPlace', 'geoId/06'),