Skip to content

Commit

Permalink
renamed input param
Browse files Browse the repository at this point in the history
  • Loading branch information
SamRWest committed Feb 15, 2024
1 parent 6127c04 commit e29c8b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xl2times/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,15 +1128,15 @@ def _count_comm_group_vectorised(comm_groups: pd.DataFrame) -> None:


def _process_comm_groups_vectorised(
comm_groups_test: pd.DataFrame, csets_ordered_for_pcg: list[str]
comm_groups: pd.DataFrame, csets_ordered_for_pcg: list[str]
) -> pd.DataFrame:
"""Sets the first commodity group in the list of csets_ordered_for_pcg as the default pcg for each region/process/io combination,
but setting the io="OUT" subset as default before "IN".
See:
Section 3.7.2.2, pg 80. of `TIMES Documentation PART IV` for details.
Args:
comm_groups_test: 'Process' DataFrame with columns ["region", "process", "io", "csets", "commoditygroup"]
comm_groups: 'Process' DataFrame with columns ["region", "process", "io", "csets", "commoditygroup"]
csets_ordered_for_pcg: List of csets in the order they should be considered for default pcg
Returns:
Processed DataFrame with a new column "DefaultVedaPCG" set to True for the default pcg in each region/process/io combination.
Expand All @@ -1157,8 +1157,8 @@ def _set_default_veda_pcg(group):
break
return group

comm_groups_test["DefaultVedaPCG"] = None
comm_groups_subset = comm_groups_test.groupby(
comm_groups["DefaultVedaPCG"] = None
comm_groups_subset = comm_groups.groupby(
["region", "process"], sort=False, as_index=False
).apply(_set_default_veda_pcg)
comm_groups_subset = comm_groups_subset.reset_index(
Expand Down

0 comments on commit e29c8b0

Please sign in to comment.