I have a dataframe with 3 columns, I would like to apply the worst of the subset to the parent in the hierarchy, the frame looks like this to start
df1 =