I have dataframe as :
Final_Status Delivered_cnt RTO_cnt
1 RTO 0 1
2 RTO 4 1
3 Delivered 4 1
4 RTO 5 1
5 RTO 2 3
6 Delivered 1 1
based on Final_Status column value , I want to update Delivered and RTO value .
For example: first row Final_Status is RTO , RTO_cnt decrease by 1.so row1 becomes :
RTO 0 0
else if Final_Status is Delivered,Delivered_cnt decrease by 1.so row3 becomes :
Delivered 3 1
Final table should be something like this :
Final_Status Delivered_cnt RTO_cnt
1 RTO 0 0
2 RTO 4 0
3 Delivered 3 1
4 RTO 5 0
5 RTO 2 2
6 Delivered 0 1