Running the df.pivot example throws the error below:
...\node_modules\nodejs-polars\bin\dataframe.js:361
return (0, exports._DataFrame)(_df.pivotExpr(values, on, index, fn, maintainOrder, sortColumns, separator));
^
Error: Given napi value is not an array
at Proxy.pivot (C:\...\node_modules\nodejs-polars\bin\dataframe.js:361:48)
at Object.<anonymous> (C:\....\app.js)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
at node:internal/main/run_main_module:23:47 {
code: 'InvalidArg'
}
Node.js v18.18.0
Have you tried latest version of polars?
What version of polars are you using?
"nodejs-polars": "^0.15.0",
What operating system are you using polars on?
Windows 11
What node version are you using
Node.js v18.18.0
Describe your bug.
Give a high level description of the bug.
What are the steps to reproduce the behavior?
Please use code instead of images, we don't like typing.
If the example is large, put it in a gist: https://gist.github.com/
If the example is small, put it in code fences:
What is the actual behavior?
Running the df.pivot example throws the error below:
What is the expected behavior?
The same output of the example here: https://pola-rs.github.io/nodejs-polars/interfaces/pl.DataFrame-1.html#pivot.pivot-1