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

DataFrame.summarise(a: product(a)) broken #982

Closed
scvalex opened this issue Sep 12, 2024 · 2 comments · Fixed by #986
Closed

DataFrame.summarise(a: product(a)) broken #982

scvalex opened this issue Sep 12, 2024 · 2 comments · Fixed by #986

Comments

@scvalex
Copy link

scvalex commented Sep 12, 2024

Livebook 0.14.0, Explorer 0.9.2

If you try to summarise a column by suming it, everything works fine. But if you try to do this with product, you get an error.

Running:

require Explorer.DataFrame, as: DF
require Explorer.Series, as: S

df =
  [%{a: 10}, %{a: 20}, %{a: 30}]
  |> DF.new()

df
|> DF.summarise(a: sum(a))

Gives the expected result:

#Explorer.DataFrame<
  Polars[1 x 1]
  a s64 [60]
>

But running the same with product:

df
|> DF.summarise(a: product(a))

Gives this error:

** (RuntimeError) cannot perform at/2 operation on Explorer.Backend.LazySeries. Query operations work on lazy series and those support only a subset of series operations
    (explorer 0.9.2) lib/explorer/backend/lazy_series.ex:1260: Explorer.Backend.LazySeries.at/2
    #cell:kk2mnlwyvlbn2sbo:9: (file)
    #cell:kk2mnlwyvlbn2sbo:9: (file)
@philss
Copy link

philss commented Sep 13, 2024

@scvalex thank for the report! This is fixed on main.

@scvalex
Copy link
Author

scvalex commented Sep 13, 2024

Thank you!

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

Successfully merging a pull request may close this issue.

2 participants