import sqlite3


def build_type_dict_from_row(row: sqlite3.Row):
    """This function takes a row from a sqlite3 query, and returns a dict of damage modifers by type."""
    type_dict = {'type': row[0], "effectiveness": {}}
    for i in range(len(row.keys())):
        if i == 0:
            continue
        else:
            type_dict['effectiveness'][row.keys()[i]] = row[i]
    return type_dict