energy = {}
data_source_rank = {} // overwrite Power with Energy with Energy(cumulative)
for (physical_quantity, ac_type), series in df.iteritems():
if physical_quantity == "power":
// Preference is to calculate energy from
After Change
for (physical_quantity, col_ac_type) in df.keys()
if col_ac_type == ac_type]
for pq in PHYSICAL_QUANTITY_PREFS:
if pq in physical_quantities:
selected_columns.append((pq, ac_type))
break
energy = {}
for col in selected_columns:
print("Calculating energy for column", col)
(physical_quantity, ac_type) = col