Update scripts/add_electricity.py

This commit is contained in:
Fabian Hofmann 2023-06-29 16:02:09 +02:00 committed by GitHub
parent 8c7c586b0c
commit cf06204e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,7 +167,7 @@ def sanitize_carriers(n, config):
if colors.isna().any():
missing_i = list(colors.index[colors.isna()])
logger.warning(f"tech_colors for carriers {missing_i} not defined in config.")
n.carriers["color"] = colors
n.carriers["color"] = n.carriers.color.where(n.carriers.color != "", colors)
def add_co2_emissions(n, costs, carriers):