Update 2nd_Max_Value

Function get_n_max finds the nth Max value for each group in a data frame and adds the results as a new column.