def identify_column_indexes(sheet, cfg):
    """ given a sheet and a config, return a data structure with 
	canonical column names as keys, and the index into a row for
	that column (indexed from 0) as values.
	"""
    cols = {}
    headerrow = cfg.getint('layout', 'headerrow')
    headers = sheet.iter_rows(min_row=headerrow, max_row=headerrow)
    for r in headers:
        for c in r:
            for col in map(lambda item: item[0], cfg.items('columnNames')):
                if c.value == cfg.get('columnNames', col):
                    cols[col] = c.column - 1
    return cols
