Skip to content

Commit

Permalink
excluding emissions from sector ratios development
Browse files Browse the repository at this point in the history
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

just changing the fillna function makes the whole PR cleaner
  • Loading branch information
toniseibold authored and fneum committed Jul 24, 2024
1 parent 0470f11 commit 9b78319
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/build_industry_sector_ratios_intermediate.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@ def build_industry_sector_ratios_intermediate():
]
today_sector_ratios_ct.loc[:, ~missing_mask] = today_sector_ratios_ct.loc[
:, ~missing_mask
].fillna(0)
].fillna(future_sector_ratios)
intermediate_sector_ratios[ct] = (
today_sector_ratios_ct * (1 - fraction_future)
+ future_sector_ratios * fraction_future
)

intermediate_sector_ratios = pd.concat(intermediate_sector_ratios, axis=1)

intermediate_sector_ratios.to_csv(snakemake.output.industry_sector_ratios)
Expand Down

0 comments on commit 9b78319

Please sign in to comment.