I have a data frame
Testcase Processing_time Pass Fail avg_failure_rate Ranking_value
t1 1.102088 8 26 76.47 69.38
t2 1.718864 19 3 13.63 7.93
t3 25 22 0 0 0
t4 15 22 0 0 0
I want to keep the first two test cases as it is from the above data frame, but I want to sort the rest of the test cases based on the shortest processing time column.
Desired output:
TestCase Processing_time Pass Fail avg_failure_rate Ranking_value
t1 1.102088 8 26 76.47 69.38
t2 1.718864 19 3 13.63 7.93
t4 15 22 0 0 0
t3 25 22 0 0 0
If the test cases have a ranking value equal to 0, they should be sorted based on the shortest processing time rule. Is there any way to accomplish this?