def dict_to_table(d):
    """Convert dict into a two-column table (one col for key, one col for value)."""
    keys, vals = [list(l) for l in zip(*list(d.items()))]
    return {'key': keys, 'val': vals}