pycountry.subdivisions.get(name='British Columbia') is not getting the value
Trying to use this to get name, but saying KeyError, not sure why since in your steps states to input "code, name, or type"....
exact quote "Subdivisions can be accessed using their unique code and provide at least their code, name and type:"
Traceback (most recent call last):
File "", line 1, in
Duplicate of #66
It seems you can use: pycountry.subdivisions.lookup('British Columbia')
@rholloway4 the language
Subdivisions can be accessed using their unique code and provide at least their code, name and type:
Indicates that the subdivisions can be accessed using their unique code... doing so will provide at least their code, name and type. I agree the language is a bit confusing. @Paul-DS is correct that the way to search by name is using lookup.
Going to make a quick update the README