[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
39e853e2b3
commit
0e1e509006
@ -845,9 +845,11 @@ def build_district_heat_share(countries: List[str], idees: pd.DataFrame) -> pd.S
|
|||||||
district_heat = idees[["derived heat residential", "derived heat services"]].sum(
|
district_heat = idees[["derived heat residential", "derived heat services"]].sum(
|
||||||
axis=1
|
axis=1
|
||||||
)
|
)
|
||||||
total_heat = idees[["thermal uses residential", "thermal uses services"]].sum(
|
total_heat = (
|
||||||
axis=1
|
idees[["thermal uses residential", "thermal uses services"]]
|
||||||
).replace(0, np.nan)
|
.sum(axis=1)
|
||||||
|
.replace(0, np.nan)
|
||||||
|
)
|
||||||
|
|
||||||
district_heat_share = district_heat / total_heat
|
district_heat_share = district_heat / total_heat
|
||||||
|
|
||||||
@ -866,7 +868,7 @@ def build_district_heat_share(countries: List[str], idees: pd.DataFrame) -> pd.S
|
|||||||
district_heat_share = pd.concat(
|
district_heat_share = pd.concat(
|
||||||
[district_heat_share, dh_share.reindex(new_index, level=0)], axis=1
|
[district_heat_share, dh_share.reindex(new_index, level=0)], axis=1
|
||||||
).min(axis=1)
|
).min(axis=1)
|
||||||
|
|
||||||
district_heat_share = district_heat_share.reindex(countries, level=0)
|
district_heat_share = district_heat_share.reindex(countries, level=0)
|
||||||
|
|
||||||
district_heat_share.name = "district heat share"
|
district_heat_share.name = "district heat share"
|
||||||
|
Loading…
Reference in New Issue
Block a user