Fix implementation of rolling_max

This commit is contained in:
Matthias 2020-02-04 07:00:53 +01:00
parent d457d43999
commit a707aeb3d0

View File

@ -288,9 +288,9 @@ def rolling_min(series, window=14, min_periods=None):
def rolling_max(series, window=14, min_periods=None):
min_periods = window if min_periods is None else min_periods
try:
return series.rolling(window=window, min_periods=min_periods).min()
return series.rolling(window=window, min_periods=min_periods).max()
except Exception as e: # noqa: F841
return pd.Series(series).rolling(window=window, min_periods=min_periods).min()
return pd.Series(series).rolling(window=window, min_periods=min_periods).max()
# ---------------------------------------------