build_hydro: handle empty year wildcard

This commit is contained in:
Fabian Neumann 2020-10-27 11:30:25 +01:00
parent dacfc8a9a4
commit 4d2f379ae1

View File

@ -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,