Open mkaut opened 4 months ago
Please provide some examples with code snippets and clear explanation
-------- Original Message -------- On 2 May 2024, 09:59, Michal Kaut wrote:
I am testing the EntsoePandasClient and getting inconsistent formatting of results, in several ways
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
I am testing the
EntsoePandasClient
and getting inconsistent formatting of results ofquery_generation()
, in several ways. In all cases, I am asking for data from 2019 to 2023, i.e., I am callingclient.query_generation(country_code, start=pd.Timestamp('20190101', tz='Europe/Brussels'), end=pd.Timestamp('20240101', tz='Europe/Brussels'))
.For Germany (
country_code = 'DE_LU'
), the result has a multi-indexed columns:The same query for Denmark's DK-1 zone (
country_code='DK_1'
) returns single-indexed columns:Note that the column names are tuples, but the
.columns
is still anIndex
, notMultiIndex
like for Germany.What's even worse, the column assignment changes when I use the
psr_type
argument in the call. To illustrate this, consider all columns for offshore wind from the previous dataframe:There, we can see that the values actually switch columns somewhere during the period. EDIT: It turns out the data switch column several times: they are in
(Wind Offshore, Actual Aggregated)
in 2019 and 2021 and inWind Offshore
in 2020, 2022, and 2023. Also note the inconsistency in naming, with the first column having name as string, while the other two as a tuple.On the other hand, asking only for offshore wind with
psr_type='B18'
returnsi.e., the values are in the
Wind Offshore column
in all years. EDIT: The values turned out to be in column(Wind Offshore, Actual Aggregated)
in 2021.In other words, values one gets with the
psr_type
argument are not a subset of values without, as I would expect.