-
Notifications
You must be signed in to change notification settings - Fork 82
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
Support multiple days forecasting with CSV data. #485
Conversation
Hi thanks for contributing. |
I tested with 1,2 and 3 days forecasting. that worked now. Earlier only 1 day worked. |
i checked the failingtest. I have almost an update ready that makes the first column of the csv actually used as a date column, current code ignores the date in the first column in the csv. The test now failes, because the provided sample csv does not match. |
… pandas if and only if it can be converted to a datetime.
dont accept this request yet. i am actually doing some extra tests still. although the included tests suceeed, i want to verify it myself still |
|
Made one more change to make sure that the time format is actually taking into account the +01:00 part. |
Thanks for contributing to this, merging |
With CSV data as input for prices, the forecasting broke if it was more than 1 day.
With the updated code, only csv data for the day that is being forcasted is taken.
File "/app/src/emhass/forecast.py", line 849, in get_forecast_out_from_csv_or_list forecast_out = pd.DataFrame( ^^^^^^^^^^^^^ File "/app/.venv/lib/python3.12/site-packages/pandas/core/frame.py", line 827, in __init__ mgr = ndarray_to_mgr( ^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 336, in ndarray_to_mgr _check_values_indices_shape_match(values, index, columns) File "/app/.venv/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 420, in _check_values_indices_shape_match raise ValueError(f"Shape of passed values is {passed}, indices imply {implied}") ValueError: Shape of passed values is (52, 1), indices imply (26, 1)