'Return a generator of pairs (key, index) by enumerating and
switching the values for rows (method `_values`).'

@classmethod
def _get_keymap(cls, data, var, as_string):

    return ((val, i) for (i, val) in enumerate(cls._values(data, var, as_string)))
