File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -409,26 +409,11 @@ def consolidate_quantity(
409409 """
410410 data = _aggregate_cache (quantity , cached )
411411
412- ignore_dst_region = "dst_region" in data .columns
413412 for agent in tuple (agents ):
414413 filter = data .agent == agent
415414 for key , value in agents [agent ].items ():
416- if key == "dst_region" and ignore_dst_region :
417- continue
418415 data .loc [filter , key ] = value
419416
420- data = data .rename (columns = {"replacement" : "technology" })
421-
422- group_cols = [c for c in data .columns if c not in [quantity , "asset" ]]
423- data = (
424- data .groupby (group_cols )
425- .sum ()
426- .infer_objects ()
427- .fillna (0 )
428- .reset_index ()
429- .drop ("asset" , axis = 1 , errors = "ignore" )
430- )
431- data = data [data [quantity ] != 0 ]
432417 return data [sorted (data .columns )]
433418
434419
You can’t perform that action at this time.
0 commit comments