I have a dataframe of 3 columns. The dataframe example is presented below with the intended final result:
initial data