plot: fix params and groupby deprecation warning

This commit is contained in:
Fabian 2024-01-31 17:07:01 +01:00
parent d32789bd02
commit 0f80e2d089
2 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,7 @@ if config["foresight"] != "perfect":
rule plot_power_network: rule plot_power_network:
params: params:
plotting=config["plotting"], plotting=config["plotting"],
foresight=config["foresight"],
input: input:
network=RESULTS network=RESULTS
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc", + "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
@ -54,6 +55,7 @@ if config["foresight"] != "perfect":
rule plot_hydrogen_network: rule plot_hydrogen_network:
params: params:
plotting=config["plotting"], plotting=config["plotting"],
foresight=config["foresight"],
input: input:
network=RESULTS network=RESULTS
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc", + "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
@ -77,6 +79,7 @@ if config["foresight"] != "perfect":
rule plot_gas_network: rule plot_gas_network:
params: params:
plotting=config["plotting"], plotting=config["plotting"],
foresight=config["foresight"],
input: input:
network=RESULTS network=RESULTS
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc", + "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",

View File

@ -98,7 +98,7 @@ def plot_map(
logger.debug(f"{comp}, {costs}") logger.debug(f"{comp}, {costs}")
costs = costs.groupby(costs.columns, axis=1).sum() costs = costs.T.groupby(costs.columns).sum().T
costs.drop(list(costs.columns[(costs == 0.0).all()]), axis=1, inplace=True) costs.drop(list(costs.columns[(costs == 0.0).all()]), axis=1, inplace=True)