r/programminghelp • u/succinctpenguin • Aug 11 '21
Other Need some help on how to compare values for pandas, eg check if the second values has increased by 50 percent of the first value, below is my pandas data so in the case, check if the value of Diesel for 2007 1.5 times than of 2006 and so on and so off.
Fuel Type 2006 2007 ... 2016 2017 2018
0 Diesel 7 4 ... 10364 15514 17253
1 Diesel-Electric 0 0 ... 22 22 21
2 Electric 1 1 ... 12 314 560
3 Petrol 471707 513375 ... 578977 574443 569673
4 Petrol-CNG 214 248 ... 1682 1006 386
5 Petrol-Electric 379 1057 ... 10075 20751 27179
6 Petrol-Electric (Plug-In) 0 0 ... 125
4
Upvotes
1
u/[deleted] Aug 11 '21
What have you tried so far?