def modify_titles(df):
    """Concatenates titles found to be similar or considered to be simplified in one category

    Parameters
    ----------
    df : panda dataframe
    
    Returns
    -------
    Simplified categories in the features 'Title'
    """
    # join less representative cotegories
    df['Title'] = df['Title'].replace(['Lady', 'Countess',
                                       'Capt', 'Col', 'Don', 'Dr', 'Major',
                                       'Rev', 'Sir', 'Jonkheer', 'Dona'], 'Rare')
    return df