def filtered_mean(df, column_name, profession_stereotypicality):
    """Get the mean effects after excluding strictly definitional professions."""

    def get_stereotypicality(vals):
        return abs(profession_stereotypicality[vals]["definitional"])

    df["profession"] = df["base_string"].apply(lambda s: s.split()[1])
    df["definitional"] = df["profession"].apply(get_stereotypicality)
    return df[df["definitional"] < 0.75][column_name].mean()