[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-03-25 14:05:17 +00:00
parent e8761c9e24
commit dda0c98b28

View File

@ -942,15 +942,30 @@ def rescale_idees_from_eurostat(
).values ).values
# set the total of agriculture/road to the sum of all agriculture/road categories (corresponding to the IDEES data) # set the total of agriculture/road to the sum of all agriculture/road categories (corresponding to the IDEES data)
energy.loc[country, "total agriculture"] = energy.loc[country, ["total agriculture electricity", "total agriculture heat", "total agriculture machinery"]].sum(axis=1) energy.loc[country, "total agriculture"] = energy.loc[
country,
[
"total agriculture electricity",
"total agriculture heat",
"total agriculture machinery",
],
].sum(axis=1)
energy.loc[country, :]["total road"] = energy[["total passenger cars", energy.loc[country, :]["total road"] = (
energy[
[
"total passenger cars",
"total other road passenger", "total other road passenger",
"total light duty road freight", "total light duty road freight",
"electricity road", "electricity road",
"electricity passenger cars", "electricity passenger cars",
"electricity other road passenger", "electricity other road passenger",
"electricity light duty road freight"]].loc[country, :].sum(axis=1) "electricity light duty road freight",
]
]
.loc[country, :]
.sum(axis=1)
)
return energy return energy