-
Notifications
You must be signed in to change notification settings - Fork 201
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
Day Ahead Prices is missing 1 row due to DST #388
Comments
Hi does anybody know how to resolve this issue, my entsoepy is the latest with 0.6.18. Even after localizing to their timezone im still missing 1 row in the middle |
What do you mean exactly by "missing 1 row in the middle"? |
start_market_date = pd.to_datetime('2023-12-31 23:00:00').tz_localize('UTC') all_dates = pd.date_range(start=df_market_price.index.min(), end=df_market_price.index.max(), freq='h') # Adjust freq as needed Identify missing dates by comparing with the existing indexmissing_rows = all_dates.difference(df_market_price.index) Display the missing rowsprint("Missing rows:", missing_rows) Missing rows: DatetimeIndex(['2024-12-31 00:00:00+01:00'], dtype='datetime64[ns, Europe/Oslo]', freq='h') This is the code i ran and the missing data is the one on 31st december |
Please put your code in proper That way comments starting with Also, please provide a coherent minimal reproducible example of code that shows your issue. |
def ENTSO_fetch(start, end, country_code):
client = EntsoePandasClient(api_key)
start_market_date = pd.to_datetime('2023-12-31 23:00:00').tz_localize('UTC')
end_market_date = pd.to_datetime('2024-12-31 22:00:00').tz_localize('UTC')
df_market_price = ENTSO_fetch(start_market_date, end_market_date, country_code)
2024-01-01 00:00:00+01:00 53.79
2024-01-01 01:00:00+01:00 48.98
2024-01-01 02:00:00+01:00 27.45
2024-01-01 03:00:00+01:00 24.48
2024-01-01 04:00:00+01:00 24.01
...
2024-12-31 19:00:00+01:00 31.10
2024-12-31 20:00:00+01:00 29.37
2024-12-31 21:00:00+01:00 24.08
2024-12-31 22:00:00+01:00 20.62
2024-12-31 23:00:00+01:00 21.94
Length: 8783, dtype: float64
The text was updated successfully, but these errors were encountered: