Skip to content

Commit 33346d5

Browse files
committed
Remove data processing in cache function
1 parent c3e15ac commit 33346d5

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

src/muse/outputs/cache.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)