|
24 | 24 | warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning)
|
25 | 25 |
|
26 | 26 | __title__ = "entsoe-py"
|
27 |
| -__version__ = "0.6.17" |
| 27 | +__version__ = "0.6.18" |
28 | 28 | __author__ = "EnergieID.be, Frank Boerman"
|
29 | 29 | __license__ = "MIT"
|
30 | 30 |
|
@@ -1262,14 +1262,16 @@ def _query_day_ahead_prices(
|
1262 | 1262 | series = series_all[resolution]
|
1263 | 1263 | # For now Day Ahead SDAC should always return at least 60 min
|
1264 | 1264 | # 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() |
1273 | 1275 |
|
1274 | 1276 | if len(series) == 0:
|
1275 | 1277 | raise NoMatchingDataError
|
|
0 commit comments