Skip to content

get_places_in proposal #72

Description

@lukesmurray

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',
]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions