mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix(utils): fix off-by-one error in how rolling window's min_periods truncates dataframe (#27388)
(cherry picked from commit d4d8625ab8)
This commit is contained in:
committed by
Michael S. Molina
parent
90afb34df5
commit
fe95adac98
@@ -97,5 +97,5 @@ def rolling( # pylint: disable=too-many-arguments
|
||||
df_rolling = _append_columns(df, df_rolling, columns)
|
||||
|
||||
if min_periods:
|
||||
df_rolling = df_rolling[min_periods:]
|
||||
df_rolling = df_rolling[min_periods - 1 :]
|
||||
return df_rolling
|
||||
|
||||
Reference in New Issue
Block a user