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

Running fold to perform a row sum gives an error code DateExpected. #79

Closed
Dan-C-Reed opened this issue Jun 22, 2023 · 0 comments · Fixed by #271
Closed

Running fold to perform a row sum gives an error code DateExpected. #79

Dan-C-Reed opened this issue Jun 22, 2023 · 0 comments · Fixed by #271
Labels
bug Something isn't working

Comments

@Dan-C-Reed
Copy link

Have you tried latest version of polars?

  • [yes]✓
  • [no]

If the problem was resolved, please update polars. :)

What version of polars are you using?

0.7.4

What operating system are you using polars on?

macOS

What node version are you using

20.3.0

Describe your bug.

Running fold to perform a row sum gives an error code DateExpected.

What are the steps to reproduce the behavior?

import('nodejs-polars').then(mod => {pl = mod})
df = pl.DataFrame({
    "a": [1, 2, 3],
    "b": [1, 2, 3],
    "c": [1, 2, 3]
});
df.fold((s1, s2) => s1.plus(s2))

What is the actual behavior?

Uncaught Error
    at dtypeWrap (xxx/node_modules/nodejs-polars/bin/series/index.js:29:65)
    at Proxy.plus (xxx/node_modules/nodejs-polars/bin/series/index.js:428:20)
    at REPL3:1:24
    at xxx/node_modules/nodejs-polars/bin/dataframe.js:166:60
    at Array.reduce (<anonymous>)
    at Proxy.fold (xxx/node_modules/nodejs-polars/bin/dataframe.js:166:38) {
  code: 'DateExpected'
}

What is the expected behavior?

Series: 'a' [f64]
[
    3
    6
    9
]
@Dan-C-Reed Dan-C-Reed added the bug Something isn't working label Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant