...traurig", "anhedon", "leere"]):
            return ("A", "Depression/Traurigkeit")
        if "angst" in t:
            return ("A", "Angstthemen")
        if "einsam" in t:
            return ("A", "Einsamkeit")
        return ("A", "Beziehungsdynamiken")
    # fallback: decide by scores: if high therapy-related maybe A
    return ("B", "Sonstiges")
df[['Hauptkategorie','Subkategorie']]=df['Titel'].apply(l...