Update scripts/add_electricity.py

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

View File

@ -162,7 +162,7 @@ def sanitize_carriers(n, config):
.reindex(carrier_i) .reindex(carrier_i)
.fillna(carrier_i.to_series().str.title()) .fillna(carrier_i.to_series().str.title())
) )
n.carriers["nice_name"] = nice_names n.carriers["nice_name"] = n.carriers.nice_name.where(n.carriers.nice_name != "", nice_names)
colors = pd.Series(config["plotting"]["tech_colors"]).reindex(carrier_i) colors = pd.Series(config["plotting"]["tech_colors"]).reindex(carrier_i)
if colors.isna().any(): if colors.isna().any():
missing_i = list(colors.index[colors.isna()]) missing_i = list(colors.index[colors.isna()])