Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queries using the EntsoePandasClient expecting yearly data return empty dataframes #292

Closed
badrbmb opened this issue Jan 17, 2024 · 2 comments

Comments

@badrbmb
Copy link

badrbmb commented Jan 17, 2024

I believe a recent change is breaking queries returning yearly data like client.query_installed_generation_capacity(country_code, start, end, psr_type=None)

example to recreate issue:

from entsoe import EntsoePandasClient
import pandas as pd


client = EntsoePandasClient(api_key=API_KEY)

start = pd.Timestamp('20171201', tz='Europe/Brussels')
end = pd.Timestamp('20180101', tz='Europe/Brussels')
country_code = "BE"

client.query_installed_generation_capacity(
    country_code=country_code, start=start, end=end, psr_type="B01"
)

Expected result:

  Biomass
2017-01-01 00:00:00+01:00    598.0

Returned results:

Empty DataFrame
Columns: [Biomass]
Index: []

Originally posted by @badrbmb in #287 (comment)

@badrbmb
Copy link
Author

badrbmb commented Jan 17, 2024

Unless the expected behavior when you pass less than 1 year between start and end is to indeed return an empty df? (this is the readme example above)

@pee-po pee-po mentioned this issue Jan 18, 2024
@tjader
Copy link

tjader commented Jan 22, 2024

I'm pretty sure fix in this commit: 494e386 is the culprit.

You also get empty dataframes if you query sparse endpoints (like query_installed_generation_capacity) over multiple years, but using a different tz info than the output.

Reverting back to 0.6.1 works for me at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants