entsoe-py: ```query_crossborder_flows``` fails in August 2021 for `DE`->`NL`
Problem
There seems to be a problem with crossborder flows query_crossborder_flows
.
In particular, querying over DE -> NL crossborder flows over summer 2021, there is a bug in august.
I assume it happens because the frequency in July is hourly data, and in September its quarterly (15min) data. Probably somewhere in august it switches from hourly to quarterly, which in turn messes up the dataframe and causes the error
Information
pandas: 1.3.4
entsoe-py: 0.4.1
python: 3.9.7
os: macOS monterey 12.0.1
Reproduction
July 2021: Correct
start = pd.Timestamp(str(int(2021_07_01)), tz='Europe/Amsterdam')
end = pd.Timestamp(str(int(2021_08_01)), tz='Europe/Amsterdam')
client.query_crossborder_flows("DE", "NL", start=start, end=end)
returns the expected output:
2021-07-01 00:00:00+02:00 1110.0
2021-07-01 01:00:00+02:00 925.0
2021-07-01 02:00:00+02:00 540.0
2021-07-01 03:00:00+02:00 743.0
2021-07-01 04:00:00+02:00 538.0
...
2021-07-31 19:00:00+02:00 1437.0
2021-07-31 20:00:00+02:00 1266.0
2021-07-31 21:00:00+02:00 2218.0
2021-07-31 22:00:00+02:00 2171.0
2021-07-31 23:00:00+02:00 2313.0
Freq: 60T, Length: 744, dtype: float64
September 2021: Correct
Similarly,
start = pd.Timestamp(str(int(2021_09_01)), tz='Europe/Amsterdam')
end = pd.Timestamp(str(int(2021_10_01)), tz='Europe/Amsterdam')
client.query_crossborder_flows("DE", "NL", start=start, end=end)
returns the expected output:
2021-09-01 00:00:00+02:00 2579.0
2021-09-01 00:15:00+02:00 2430.0
2021-09-01 00:30:00+02:00 2378.0
2021-09-01 00:45:00+02:00 2281.0
2021-09-01 01:00:00+02:00 2287.0
...
2021-09-30 22:45:00+02:00 843.0
2021-09-30 23:00:00+02:00 1210.0
2021-09-30 23:15:00+02:00 1191.0
2021-09-30 23:30:00+02:00 1233.0
2021-09-30 23:45:00+02:00 1233.0
Freq: 15T, Length: 2880, dtype: float64
August 2021: Problem
However this one fails:
start = pd.Timestamp(str(int(2021_08_01)), tz='Europe/Amsterdam')
end = pd.Timestamp(str(int(2021_09_01)), tz='Europe/Amsterdam')
client.query_crossborder_flows("DE", "NL", start=start, end=end)
with
ValueError: Length mismatch: Expected axis has 22 elements, new values have 85 elements
Lastly, I just wanted to thank all contributors of this library, it has saved me enormous amount of time and headaches I had working with the entsoe XML API. Thanks!
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15
hi @MattEwen and @charelF the issue is now fixed by ENTSO-E for all cases we discussed here 😄
hi @MattEwen I have received a reply it is fixed now on dutch borders but the other borders they are sill looking into.