-
Notifications
You must be signed in to change notification settings - Fork 89
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
[Bug]: pandas-wrapped narwhals .over() leads to inconsistent result #1296
Comments
Hey @mscolnick , thanks for reporting the issue. What I mean by that: over does end up applying only to the reduction df.with_columns(
(nw.col("start") - nw.min("start").over("item")).alias("shifted")
) the result is consistent across backends. I apologize if I am missing something 🙈 |
Ah, I got it. I am probably using the API wrong. I was doing: (
pl.col("year") * 12
+ pl.col("month")
- pl.min("year") * 12
- pl.min("month")
+ 1
).over("project") but since this worked (in polars), I didn't think twice about doing (
pl.col("year") * 12
+ pl.col("month")
- pl.min("year").over("project") * 12
- pl.min("month").over("project")
+ 1
) Makes sense, and fine to close! |
thanks for the report! if we only support reductions with |
Our current Expr API for pandas-like and pyarrow does not distinguish between aggregation or not, while for Dask it does. |
Describe the bug
Steps or code to reproduce the bug
https://static.marimo.app/static/narwhals-bug-bo1z
Expected results
Expected the results of polars. Values are incrementing.
Actual results
Values are the same
Please run narwhals.show_version() and enter the output below.
The text was updated successfully, but these errors were encountered: