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

Various FutureWarnings in logs for downcasting objects #1307

Open
Flix6x opened this issue Jan 13, 2025 · 0 comments
Open

Various FutureWarnings in logs for downcasting objects #1307

Flix6x opened this issue Jan 13, 2025 · 0 comments

Comments

@Flix6x
Copy link
Contributor

Flix6x commented Jan 13, 2025

Specifically, in these places (for Python 3.10), since flexmeasures==0.24:

/usr/local/lib/python3.10/dist-packages/timely_beliefs/beliefs/utils.py:1183: FutureWarning: BeliefsDataFrame.fillna with 'method' is deprecated and will raise in a future version. Use obj.ffill() or obj.bfill() instead.
  df = df.fillna(
/usr/local/lib/python3.10/dist-packages/flexmeasures/data/models/planning/storage.py:986: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value '0.05015 MWh' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
  device_values.loc[soc_constraint_start:end_of_schedule] = soc
/usr/local/lib/python3.10/dist-packages/flexmeasures/data/models/planning/storage.py:1087: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version. Call result.infer_objects(copy=False) instead. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)`
  storage_device_constraints["max"] = storage_device_constraints["max"].fillna(
/usr/local/lib/python3.10/dist-packages/flexmeasures/data/models/planning/storage.py:1302: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version. Call result.infer_objects(copy=False) instead. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)`
  lhs = constraints_df.fillna(0).eval(lhs_expression).round(round_to_decimals)
/usr/local/lib/python3.10/dist-packages/flexmeasures/data/models/planning/storage.py:1303: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version. Call result.infer_objects(copy=False) instead. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)`
  rhs = constraints_df.fillna(0).eval(rhs_expression).round(round_to_decimals)
/usr/local/lib/python3.10/dist-packages/flexmeasures/data/models/planning/linear_optimization.py:216: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version. Call result.infer_objects(copy=False) instead. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)`
  ].fillna(0)
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

1 participant