From ee9bfd10b590db28d95a47f978060119792d53b7 Mon Sep 17 00:00:00 2001 From: Frank Boerman Date: Wed, 21 Feb 2024 16:32:14 +0100 Subject: [PATCH] fixed issue with resampling with nan values added DK_1 to GB neighbours after go live of viking link (#308) fixed merging strategy for utility function for load forecast and actual (#307) --- entsoe/entsoe.py | 6 +++--- entsoe/mappings.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/entsoe/entsoe.py b/entsoe/entsoe.py index debfcc1..4ef7699 100644 --- a/entsoe/entsoe.py +++ b/entsoe/entsoe.py @@ -23,7 +23,7 @@ warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning) __title__ = "entsoe-py" -__version__ = "0.6.6" +__version__ = "0.6.7" __author__ = "EnergieID.be, Frank Boerman" __license__ = "MIT" @@ -1259,7 +1259,7 @@ def query_load_and_forecast( """ df_load_forecast_da = self.query_load_forecast(country_code, start=start, end=end) df_load = self.query_load(country_code, start=start, end=end) - return df_load_forecast_da.join(df_load, sort=True, how='inner') + return df_load_forecast_da.join(df_load, sort=True, how='outer') @year_limited @@ -2139,7 +2139,7 @@ def query_physical_crossborder_allborders(self, country_code: Union[Area, str], df = df.truncate(before=start, after=end) df['sum'] = df.sum(axis=1) if per_hour: - df = df.resample('h').mean() + df = df.resample('h').first() return df diff --git a/entsoe/mappings.py b/entsoe/mappings.py index 2d8990f..e6253d3 100644 --- a/entsoe/mappings.py +++ b/entsoe/mappings.py @@ -281,7 +281,7 @@ def code(self): 'CH': ['AT', 'DE_AT_LU', 'DE_LU', 'FR', 'IT_NORD', 'IT_NORD_CH'], 'AT': ['CH', 'CZ', 'DE_LU', 'HU', 'IT_NORD', 'SI'], 'CZ': ['AT', 'DE_AT_LU', 'DE_LU', 'PL', 'SK'], - 'GB': ['BE', 'FR', 'IE_SEM', 'NL', 'NO_2'], + 'GB': ['BE', 'FR', 'IE_SEM', 'NL', 'NO_2', 'DK_1'], 'NO_2': ['DE_LU', 'DK_1', 'NL', 'NO_1', 'NO_5', 'GB'], 'HU': ['AT', 'HR', 'RO', 'RS', 'SK', 'UA'], 'IT_NORD': ['CH', 'DE_AT_LU', 'FR', 'SI', 'AT', 'IT_CNOR'],