I am currently working with pandas and have a df that currently looks something like this:
     LOCATION   TIME   Value       
0         AUS   2000   33.595673       
1         AUS   2001   57.862362
2         AUS   2002   58.588608
3          UK   2000   61.7
4          UK   2001   63.243232
5          UK   2002   66.235122
I want to add another column that lists the differences between subsequent rows in the values column but want it to restart when the LOCATION changes. So essentially it should restart between rows 2 and 3 in the example above
 
     
    