Skip to content

Commit c03c604

Browse files
committed
make an exception to the forced 60 min mtu for EXAA prices
1 parent 0e9e6dd commit c03c604

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

entsoe/entsoe.py

+11-9
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning)
2525

2626
__title__ = "entsoe-py"
27-
__version__ = "0.6.17"
27+
__version__ = "0.6.18"
2828
__author__ = "EnergieID.be, Frank Boerman"
2929
__license__ = "MIT"
3030

@@ -1262,14 +1262,16 @@ def _query_day_ahead_prices(
12621262
series = series_all[resolution]
12631263
# For now Day Ahead SDAC should always return at least 60 min
12641264
# if there is either no 60 min data at all or 60 and 15/30 but none overlapping then force it to be 60 min
1265-
if resolution == '60min' and len(series_all['60min']) == 0:
1266-
for res in ['15min', '30min']:
1267-
if len(series_all[res]) != 0:
1268-
return series_all[res].resample('h').first()
1269-
elif resolution == '60min' and sum([len(x) > 0 for x in series_all.values()]) > 1:
1270-
for res in ['15min', '30min']:
1271-
if len(series_all['60min'].index.intersection(series_all[res])) == 0 and len(series_all[res]) > 0:
1272-
return pd.concat([series_all['60min'], series_all[res]]).resample('h').first()
1265+
# due to the existence of EXAA prices that are published as day ahead, this should not happen for DE_LU and AT!
1266+
if area.name not in ['DE_LU', 'AT']:
1267+
if resolution == '60min' and len(series_all['60min']) == 0:
1268+
for res in ['15min', '30min']:
1269+
if len(series_all[res]) != 0:
1270+
return series_all[res].resample('h').first()
1271+
elif resolution == '60min' and sum([len(x) > 0 for x in series_all.values()]) > 1:
1272+
for res in ['15min', '30min']:
1273+
if len(series_all['60min'].index.intersection(series_all[res])) == 0 and len(series_all[res]) > 0:
1274+
return pd.concat([series_all['60min'], series_all[res]]).resample('h').first()
12731275

12741276
if len(series) == 0:
12751277
raise NoMatchingDataError

0 commit comments

Comments
 (0)