Supposed I have a data frame with these rows as the last 8 row.
time a b b d e f
2018-03-04 10:00:00 86.0 194.0 1.084830 1.088466 196.000000 84.333333
2018-03-04 10:30:00 37.0 59.0 1.082257 1.091397 203.000000 87.833333
2018-03-04 11:00:00 65.0 117.0 1.068825 1.091043 220.166667 96.666667
2018-03-04 11:30:00 10.0 9.0 1.070807 1.087203 183.666667 82.333333
2018-03-04 12:00:00 94.0 157.0 1.083382 1.077549 112.833333 61.666667
2018-03-04 12:30:00 66.0 68.0 1.075636 1.077623 100.666667 59.666667
2018-03-04 13:00:00 224.0 607.0 1.152262 1.088861 169.500000 82.666667
2018-03-04 13:30:00 112.0 279.0 1.119430 1.095057 206.166667 95.166667
How do I create a new column "g" using this condition on Pandas: If the row is the last row, value is 100%, If the row is the 2nd last row, value is 95%.. until it reach 70%, else it will be 0?

