From 9445534a93be2da94a397955cf03de5a36e25cb3 Mon Sep 17 00:00:00 2001 From: Marco Gorelli Date: Wed, 8 Jan 2020 13:54:16 +0000 Subject: [PATCH] :pencil: add example of rolling with win_type gaussian --- pandas/core/window/rolling.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 02efd4e37472a..f612826132fd7 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -872,6 +872,17 @@ class Window(_Window): 3 NaN 4 NaN + Rolling sum with a window length of 2, using the 'gaussian' + window type (note how we need to specify std). + + >>> df.rolling(2, win_type='gaussian').sum(std=3) + B + 0 NaN + 1 0.986207 + 2 2.958621 + 3 NaN + 4 NaN + Rolling sum with a window length of 2, min_periods defaults to the window length.