Fix custom busmap read in cluster network

This commit is contained in:
Thomas Gilon 2024-04-09 17:30:38 +02:00
parent ce1e531ad0
commit b673b947ea
2 changed files with 4 additions and 2 deletions

View File

@ -174,6 +174,8 @@ Upcoming Release
* Fix index of existing capacities in `add_power_capacities_installed_before_baseyear` with `m` option. * Fix index of existing capacities in `add_power_capacities_installed_before_baseyear` with `m` option.
* Fix custom busmap read in `cluster_network`.
PyPSA-Eur 0.10.0 (19th February 2024) PyPSA-Eur 0.10.0 (19th February 2024)
===================================== =====================================

View File

@ -519,8 +519,8 @@ if __name__ == "__main__":
custom_busmap = params.custom_busmap custom_busmap = params.custom_busmap
if custom_busmap: if custom_busmap:
custom_busmap = pd.read_csv( custom_busmap = pd.read_csv(
snakemake.input.custom_busmap, index_col=0, squeeze=True snakemake.input.custom_busmap, index_col=0
) ).squeeze()
custom_busmap.index = custom_busmap.index.astype(str) custom_busmap.index = custom_busmap.index.astype(str)
logger.info(f"Imported custom busmap from {snakemake.input.custom_busmap}") logger.info(f"Imported custom busmap from {snakemake.input.custom_busmap}")