Open irohitb opened 2 years ago
Hi, Indeed, the default export seems not working well.
It seems working when not importing the default.
Workaround in esm:
import { DataFrame } from "dataframe-js";
const df = new DataFrame([[1, 2, 3]], ["a", "b", "c"]);
or in cjs:
const DataFrame = require("dataframe-js").default;
const df = new DataFrame([[1, 2, 3]], ["a", "b", "c"]);
@Gmousse Thanks, I was able to make it work using the workaround.
@Gmousse I came here to report a similar issue, but I was going to suggest updating the documentation, as this took me 20+ minutes to troubleshoot.
Alternatively/even better, you could fix the default export to work the way the documentation says it will. I don't have the time at the moment to research how to do that, but it might be a breaking change for others that already use the library. I'm not sure if that's an option.
Bug.
I am doing this
but this keeps throwing error that DataFrame is not a constructor