def filter_for_concept(df, concept):
    """
    Filter the aggregated dataframe for all segment-concept pairs matching concept.
    Use to get all info on 1 concept for the book.
    :param df: aggregated dataframe [segment-concept, experts, trial_0, trial_1...]
    :param concept: a string representation of the concept
    :return: a new dataframe with only the segment concept pairs matching concept
    """
    if concept == 'Sagesse Pratique':
        return df[df.index.str.endswith(f'-{concept}')]
    else:
        return df[df.index.str.endswith(f'-{concept.capitalize()}')]