def reorder_columns(idx, single_session):
    """ Reorder the name of columns

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

    Returns
    -------
    column          : list or None
        Reordered column
    """
    if idx == 0:
        if single_session:
            return ['Subject', 'DataType', 'Filename', 'Abspath']
        else:
            return ['Subject', 'Session', 'DataType', 'Filename', 'Abspath']
    elif idx == 1:
        if single_session:
            return ['Pipeline', 'Step', 'Subject', 'Filename', 'Abspath']
        else:
            return ['Pipeline', 'Step', 'Subject', 'Session', 'Filename',
                'Abspath']
    elif idx == 2:
        if single_session:
            return ['Pipeline', 'Result', 'Subject', 'Filename', 'Abspath']
        else:
            return ['Pipeline', 'Result', 'Subject', 'Session', 'Filename',
                'Abspath']
    else:
        return None
