[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] 2023-07-26 06:48:08 +00:00
parent 5231135d5f
commit f970ba0fd0

View File

@ -299,9 +299,9 @@ def calculate_energy(n, label, energy):
)
# remove values where bus is missing (bug in nomopyomo)
no_bus = c.df.index[c.df["bus" + port] == ""]
totals.loc[no_bus] = float(n.component_attrs[c.name].loc[
"p" + port, "default"
])
totals.loc[no_bus] = float(
n.component_attrs[c.name].loc["p" + port, "default"]
)
c_energies -= totals.groupby(c.df.carrier).sum()
c_energies = pd.concat([c_energies], keys=[c.list_name])