Let's say I have a couple of dictionaries (one per hour) which all have the same keys:
h1={'a':1, 'b':3, 'c':10}
h2={'a':7, 'b':15, 'c':2}
h3={'a':9, 'b':15, 'c':35}
How can I get the sum of absolute values between the next hours for all hours and keys, meaning a sum of the form:
|1-7|+|7-9|+|3-15|+|15-15|+|10-2|+|2-35|
more generally it is something of the form:
where beta is 1, the psts are the keys of our dictionary and we also sum over hours.
