I have this problem that i want to fix. I want to create news columns in my data frame according to a condition that i take the Canal element where the date is the more recent ( the max ). My data is like follow:
[
and what i want is :
output DF:
[
I want to create the last two columns (WinnerInteraction & WinnerCanal) based on the max InteractionDate. So for each conversion ID (ConvID) it should look at the interaction Date and then select the max (the max hour if it's the same date) . Then it will extract the interaction and canal from that line.