<gh_stars>0
from openpyxl import load_workbook
from collections import defaultdict

wb = load_workbook('table-lysN.xlsx')
ws = wb['Sheet1']

database = defaultdict(list)
row_ = 1
name = ''
while True:
    name_t = ws[row_][0].value
    if name_t:
        name = name_t
    value = ws[row_][1].value
    if not value:
        break
    database[name].append(value)
    row_ += 1

database_r = defaultdict(list)
for k,vs in database.items():
    for v in vs:
        database_r[v].append(k)
        
from openpyxl import load_workbook
from collections import defaultdict

wb = load_workbook('table-lysN.xlsx')
ws = wb['Sheet1']

database = defaultdict(list)
row_ = 1
name = ''
while True:
    name_t = ws[row_][0].value
    if name_t:
        name = name_t
    value = ws[row_][1].value
    if not value:
        break
    database[name].append(value)
    row_ += 1

database_r = defaultdict(list)
for k,vs in database.items():
    for v in vs:
        database_r[v].append(k)