Skip to content

Expr.rolling_*_by exist but these method are not on SeriesΒ #22066

@coastalwhite

Description

@coastalwhite

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

import polars as pl
from datetime import datetime
date = pl.datetime_range(
    datetime(2001, 1, 1),
    datetime(2001, 1, 2),
   "1h",
   eager=True
)

 # This works fine
pl.select(pl.lit(pl.Series("index", range(25))).rolling_mean_by(s, "2h"))

# This doesn't exist
pl.Series("index", range(25)).rolling_mean_by(s, "2h")

Log output

AttributeError: 'Series' object has no attribute 'rolling_mean_by'

Issue description

The rule is usually that functions are both implemented on Expr and Series. That was not done here.

Expected behavior

Series has these methods as well.

Installed versions

Replace this line with the output of pl.show_versions(). Leave the backticks in place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedReady for implementationbugSomething isn't workinggood first issueGood for newcomerspythonRelated to Python Polars

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions