code: def calc_deltas(data_frame, series=None):
      
      series = series or []
      data_frame = data_frame.sort_index(ascending=True)
  
      for s in series:
          prev_values = iter(data_frame[s])
          # Burn the first value, so the first row we call delta_from_prev()
          # for gets its previous value from the second row in the series,
          # and so on.
          next(prev_values)
          data_frame[s] = data_frame[s].apply(functools.partial(
              delta_from_prev, iter(prev_values),
              this_and_prev(iter(data_frame.index))))
  
      return data_frame
docs: Many of collectl's data values are cumulative (monotonically
      increasing), so subtract the previous value to determine the value
      for the current interval.