From 2b319b1642f9b2aa5e729e76cf247229c1cfd763 Mon Sep 17 00:00:00 2001 From: Frank Boerman Date: Tue, 22 Oct 2024 23:55:09 +0200 Subject: [PATCH] make sure to sort index from splitted blocks of day ahead prices before truncating --- entsoe/entsoe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entsoe/entsoe.py b/entsoe/entsoe.py index 55a07c5..7da8343 100644 --- a/entsoe/entsoe.py +++ b/entsoe/entsoe.py @@ -23,7 +23,7 @@ warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning) __title__ = "entsoe-py" -__version__ = "0.6.13" +__version__ = "0.6.14" __author__ = "EnergieID.be, Frank Boerman" __license__ = "MIT" @@ -1231,7 +1231,7 @@ def query_day_ahead_prices( end=end+pd.Timedelta(days=1), resolution=resolution ) - series = series.tz_convert(area.tz) + series = series.tz_convert(area.tz).sort_index() series = series.truncate(before=start, after=end) # because of the above fix we need to check again if any valid data exists after truncating if len(series) == 0: