I’m trying to return the highest frequency trigram in a new column in a pandas dataframe for each group of keywords. (Essentially something like a groupby with transform, returning the highest trigram in a new column). An example dataframe with dummy data Desired Output Minimum Reproducible Example What I’ve tried. I have working code to find bigrams but it’s a