Skip to content

Commit

Permalink
fix: pandas 2.1.2 deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPic committed Nov 7, 2023
1 parent 909bb44 commit b2a4b84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ehyd_tools/sww_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def guess_freq(date_time_index, default=pd.Timedelta(minutes=1)):
if pd.notnull(freq):
return to_offset(freq)

delta_series = date_time_index.to_series().diff(periods=1).fillna(method='backfill')
delta_series = date_time_index.to_series().diff(periods=1).bfill() # .fillna(method='backfill')
counts = delta_series.value_counts()
counts.drop(pd.Timedelta(minutes=0), errors='ignore')

Expand Down

0 comments on commit b2a4b84

Please sign in to comment.