From 4d2f379ae1dbdff666fa5443a215a4dffad86d68 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Tue, 27 Oct 2020 11:30:25 +0100 Subject: [PATCH] build_hydro: handle empty year wildcard --- scripts/build_hydro_profile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_hydro_profile.py b/scripts/build_hydro_profile.py index 46911363..7e1bd212 100644 --- a/scripts/build_hydro_profile.py +++ b/scripts/build_hydro_profile.py @@ -89,7 +89,7 @@ if __name__ == "__main__": eia_stats = vhydro.get_eia_annual_hydro_generation(snakemake.input.eia_hydro_generation).reindex(columns=countries) - if year not in eia_stats.index: + if len(year) > 0 and year not in eia_stats.index: eia_stats.loc[year] = eia_stats.mean() inflow = cutout.runoff(shapes=country_shapes,