From 2cf8f1374f6759b78d0e527433d0e03eb0d8ae2d Mon Sep 17 00:00:00 2001 From: Jonas Hoersch Date: Tue, 5 Feb 2019 23:02:59 +0100 Subject: [PATCH] add_electricity: Fix for pandas 0.24 breaking change --- scripts/add_electricity.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index 1fa37ef3..f5be25c6 100644 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -118,6 +118,9 @@ def attach_load(n): opsd_load = timeseries_opsd(slice(*n.snapshots[[0,-1]].year.astype(str)), snakemake.input.opsd_load) + # Convert to naive UTC (has to be explicit since pandas 0.24) + opsd_load.index = opsd_load.index.tz_localize(None) + nuts3 = gpd.read_file(snakemake.input.nuts3_shapes).set_index('index') def normed(x): return x.divide(x.sum())