regionmask.Regions_cls.map_keys

Regions_cls.map_keys(key)

map from names and abbrevs of the regions to numbers

Parameters:

key : (list of) string

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

Returns:

mapped_key : int or list of int

Raises a KeyError if the key does not exist.