Skip to content

Commit

Permalink
Fix pandas deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Sep 9, 2024
1 parent 890bee3 commit 4a295df
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/fmu/ensemble/virtualrealization.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,15 +381,10 @@ def get_smry(self, column_keys=None, time_index="monthly"):
]
if cum_columns:
smry[cum_columns] = (
smry[cum_columns]
.interpolate(method="time")
.fillna(method="ffill")
.fillna(method="bfill")
smry[cum_columns].interpolate(method="time").ffill().bfill()
)
if noncum_columns:
smry[noncum_columns] = (
smry[noncum_columns].fillna(method="bfill").fillna(value=0)
)
smry[noncum_columns] = smry[noncum_columns].bfill().fillna(value=0)

smry.index = smry.index.set_names(["DATE"])
return smry.loc[pd.to_datetime(time_index_dt)]
Expand Down

0 comments on commit 4a295df

Please sign in to comment.