def update_columns(idx, single_session):
    """ Update name of columns according to the set Dataclass

    Parameters
    ----------
    idx             : int
        Dataclass index
    single_session  : boolean
        True if the project is single session

    Returns
    -------
    column          : dict
        New list of columns
    """
    if idx == 0:
        if single_session:
            subject, session, dtype = 1, 3, 2
        else:
            subject, session, dtype = 1, 2, 3
        columns = {(0): 'DataClass', subject: 'Subject', session: 'Session',
            dtype: 'DataType'}
    elif idx == 1:
        columns = {(0): 'DataClass', (1): 'Pipeline', (2): 'Step', (3):
            'Subject', (4): 'Session'}
    elif idx == 2:
        columns = {(0): 'DataClass', (1): 'Pipeline', (2): 'Result', (3):
            'Subject', (4): 'Session'}
    else:
        columns = {(0): 'DataClass'}
    return columns
