regionmask.Regions.map_keys

Regions.map_keys(key) int | list[int]

map from names and abbrevs of the regions to numbers

Parameters:
keystr | list of str

key can be a single or a list of abbreviation/ name of existing regions.

Returns:
mapped_keyint or list of int
Raises:
KeyError if the key does not exist.