Skip to content

Commit

Permalink
Fix 'incompatible dtype' FutureWarning in pandas 2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jnettels committed Feb 3, 2025
1 parent 9b28071 commit 2cd4c50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/demandlib/bdew/elec_slp.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ def create_bdew_load_profiles(self, dt_index, slp_types, holidays=None):
new_df, holidays=holidays, holiday_is_sunday=True
)

new_df["hour"] = dt_index.hour.astype(int)
new_df["weekday"] = new_df["weekday"].astype(int)
new_df["minute"] = dt_index.minute.astype(int)
new_df["hour"] = dt_index.hour.astype('int64')
new_df["weekday"] = new_df["weekday"].astype('int64')
new_df["minute"] = dt_index.minute.astype('int64')
time_df = new_df[["date", "hour", "minute", "weekday"]].copy()
tmp_df[slp_types] = tmp_df[slp_types].astype(float)

Expand Down

0 comments on commit 2cd4c50

Please # to comment.