You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cum_sum expression raises an exception when used with the over expression.
I did a quick review of the code and I believe this issue can be resolved by simply adding the cum_sum expression name to the dictionary that maps pandas method names to polars method names. I would like to open a pull request to solve this c:
File "/Users/abelisaiasgutierrezcruz/Documents/Proyects/test_narwhals/.venv/lib/python3.12/site-packages/narwhals/_expression_parsing.py", line 98, in<genexpr>forsublistin (evaluate_into_expr(df, into_expr) forinto_exprin exprs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/abelisaiasgutierrezcruz/Documents/Proyects/test_narwhals/.venv/lib/python3.12/site-packages/narwhals/_expression_parsing.py", line 63, in evaluate_into_expr
return expr._call(df) # type: ignore[arg-type]
^^^^^^^^^^^^^^
File "/Users/abelisaiasgutierrezcruz/Documents/Proyects/test_narwhals/.venv/lib/python3.12/site-packages/narwhals/_pandas_like/expr.py", line 334, in func
tmp = df.group_by(*keys).agg(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/abelisaiasgutierrezcruz/Documents/Proyects/test_narwhals/.venv/lib/python3.12/site-packages/narwhals/_pandas_like/group_by.py", line 76, in agg
return agg_pandas(
^^^^^^^^^^^
File "/Users/abelisaiasgutierrezcruz/Documents/Proyects/test_narwhals/.venv/lib/python3.12/site-packages/narwhals/_pandas_like/group_by.py", line 184, in agg_pandas
raise RuntimeError(msg) from exc
RuntimeError: Failed to aggregated - does your aggregation functionreturn a scalar?
The text was updated successfully, but these errors were encountered:
I did a quick review of the code and I believe this issue can be resolved by simply adding the cum_sum expression name to the dictionary that maps pandas method names to polars method names. I would like to open a pull request to solve this c:
Describe the bug
The
cum_sum
expression raises an exception when used with theover
expression.I did a quick review of the code and I believe this issue can be resolved by simply adding the cum_sum expression name to the dictionary that maps pandas method names to polars method names. I would like to open a pull request to solve this c:
Steps or code to reproduce the bug
Expected results
Actual results
RuntimeError: Failed to aggregated - does your aggregation function return a scalar?
Please run narwhals.show_version() and enter the output below.
Relevant log output
The text was updated successfully, but these errors were encountered: