Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task: Consider switching moving_* to polars functions. #39

Open
ReinderVosDeWael opened this issue May 15, 2024 · 0 comments
Open

Task: Consider switching moving_* to polars functions. #39

ReinderVosDeWael opened this issue May 15, 2024 · 0 comments

Comments

@ReinderVosDeWael
Copy link
Contributor

ReinderVosDeWael commented May 15, 2024

We could consider switching these to e.g.

def rolling_median(arr, window_size):
  df = pl.DataFrame(arr)
  rolling_median = df.select([
        pl.col("*").rolling_mean(window_size)
    ])
  return np.array(rolling_median)

Original comment by Florian:

Why not use https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.Expr.rolling_median.html and other polars.rolling_* methods instead of implementing all of these?

Originally posted by @nx10 in #38 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant