Skip to content
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

get_places_in proposal #72

Open
lukesmurray opened this issue Aug 7, 2019 · 0 comments
Open

get_places_in proposal #72

lukesmurray opened this issue Aug 7, 2019 · 0 comments
Labels
python api feedback Feedback for the Python Client API

Comments

@lukesmurray
Copy link
Contributor

If I want to get a list of dcids for states in the United States I currently have to use one of the following two options.

# input is a list of dcids
# output is a dictionary with one key
dc.get_places_in(['country/USA'], 'State')['country/USA']
# input is a series of dcids
# output is a list with one element
dc.get_places_in(pd.Series(['country/USA']), 'State')[0]

I would prefer to be able to put in one string and get the output as a list.

>>> df.get_places_in('country/USA', 'State')
[u'geoId/41',
 u'geoId/31',
 u'geoId/12',
 u'geoId/39',
...
 u'geoId/22',
]
@antaresc antaresc added the python api feedback Feedback for the Python Client API label Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python api feedback Feedback for the Python Client API
Projects
None yet
Development

No branches or pull requests

2 participants