Skip to content

Commit 2351176

Browse files
committed
fillna replaced with ffill (deprecation warning)
1 parent 4f437fd commit 2351176

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pypromice/qc/persistence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,6 @@ def duration_consecutive_true(
161161
# assert series.dtype == bool
162162
cumsum = ((series.index - series.index[0]).total_seconds()/3600).to_series(index=series.index)
163163
is_first = series.astype("int").diff() == 1
164-
offset = (is_first * cumsum).replace(0, np.nan).fillna(method="ffill").fillna(0)
164+
offset = (is_first * cumsum).replace(0, np.nan).ffill().fillna(0)
165165

166166
return (cumsum - offset) * series

0 commit comments

Comments
 (0)