def _overwrite_cell(row, idx, val, fill=''):
    """
    Either:
    -- overwrite the cell at row[idx] if it exists
    -- pad the row until you can append the idx col, and then write it
    """
    while len(row) <= idx:
        row.append(fill)
    row[idx] = val
    return row