From 7d98906b59689e27d6b09e3c4d40bb7efcbb4cf2 Mon Sep 17 00:00:00 2001 From: Stijn de Gooijer Date: Thu, 16 Nov 2023 14:15:37 +0100 Subject: [PATCH] Update user guide examples --- .../python/user-guide/transformations/time-series/rolling.py | 2 +- docs/src/rust/user-guide/transformations/time-series/rolling.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/python/user-guide/transformations/time-series/rolling.py b/docs/src/python/user-guide/transformations/time-series/rolling.py index eef3c8d51705e..0a65cbc195fd5 100644 --- a/docs/src/python/user-guide/transformations/time-series/rolling.py +++ b/docs/src/python/user-guide/transformations/time-series/rolling.py @@ -30,7 +30,7 @@ ) out = df.group_by_dynamic("time", every="1mo", period="1mo", closed="left").agg( - pl.col("time").cumcount().reverse().head(3).alias("day/eom"), + pl.col("time").cum_count().reverse().head(3).alias("day/eom"), ((pl.col("time") - pl.col("time").first()).last().dt.total_days() + 1).alias( "days_in_month" ), diff --git a/docs/src/rust/user-guide/transformations/time-series/rolling.rs b/docs/src/rust/user-guide/transformations/time-series/rolling.rs index 65ad153078281..5f5533d302ce0 100644 --- a/docs/src/rust/user-guide/transformations/time-series/rolling.rs +++ b/docs/src/rust/user-guide/transformations/time-series/rolling.rs @@ -78,7 +78,7 @@ fn main() -> Result<(), Box> { ) .agg([ col("time") - .cumcount(true) // python example has false + .cum_count(true) // python example has false .reverse() .head(Some(3)) .alias("day/eom"),