Skip to content

Commit

Permalink
address groupby(axis=...) deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
fneum committed Jul 29, 2024
1 parent f5fe0d0 commit cb48d53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/build_retro_cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ def calculate_gain_utilisation_factor(heat_transfer_perm2, Q_ht, Q_gain):
Calculates gain utilisation factor nu.
"""
# time constant of the building tau [h] = c_m [Wh/(m^2K)] * 1 /(H_tr_e+H_tb*H_ve) [m^2 K /W]
tau = c_m / heat_transfer_perm2.T.groupby(axis=1).sum().T
tau = c_m / heat_transfer_perm2.groupby().sum()
alpha = alpha_H_0 + (tau / tau_H_0)
# heat balance ratio
gamma = (1 / Q_ht).mul(Q_gain.sum(axis=1), axis=0)
Expand Down
2 changes: 1 addition & 1 deletion scripts/plot_validation_electricity_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
optimized = optimized[["Generator", "StorageUnit"]].droplevel(0, axis=1)
optimized = optimized.rename(columns=n.buses.country, level=0)
optimized = optimized.rename(columns=carrier_groups, level=1)
optimized = optimized.groupby(axis=1, level=[0, 1]).sum()
optimized = optimized.T.groupby(level=[0, 1]).sum().T

data = pd.concat([historic, optimized], keys=["Historic", "Optimized"], axis=1)
data.columns.names = ["Kind", "Country", "Carrier"]
Expand Down

0 comments on commit cb48d53

Please sign in to comment.