Skip to content

Commit

Permalink
fix: udwf example (#948)
Browse files Browse the repository at this point in the history
  • Loading branch information
mesejo authored Nov 23, 2024
1 parent 92b093c commit 54e5e0d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions examples/python-udwf.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,35 +185,36 @@ def evaluate_all(self, values: list[pa.Array], num_rows: int) -> pa.Array:
df = ctx.create_dataframe([[batch]])

exp_smooth = udwf(
ExponentialSmoothDefault(0.9),
lambda: ExponentialSmoothDefault(0.9),
pa.float64(),
pa.float64(),
volatility="immutable",
)

smooth_two_row = udwf(
SmoothBoundedFromPreviousRow(0.9),
lambda: SmoothBoundedFromPreviousRow(0.9),
pa.float64(),
pa.float64(),
volatility="immutable",
)

smooth_rank = udwf(
SmoothAcrossRank(0.9),
lambda: SmoothAcrossRank(0.9),
pa.float64(),
pa.float64(),
volatility="immutable",
)

smooth_frame = udwf(
ExponentialSmoothFrame(0.9),
lambda: ExponentialSmoothFrame(0.9),
pa.float64(),
pa.float64(),
volatility="immutable",
name="smooth_frame",
)

smooth_two_col = udwf(
SmoothTwoColumn(0.9),
lambda: SmoothTwoColumn(0.9),
[pa.float64(), pa.int64()],
pa.float64(),
volatility="immutable",
Expand Down

0 comments on commit 54e5e0d

Please sign in to comment.