Compare Row & only keep the highest value
조회 수: 1(최근 30일)
I have a matrix like this:
I want the output like this:
I.e. what I need is in the second column compare each row against previouos row. In case current row is higher than the previous row then keep it but if the previous row is higher then copy the prvious row in the current row.
I am aware that I can do it via a for loop. But is there any way to do it a more clean way through matrix operation?
Many thanks in advance for your help.