I'm using dataframe-js. https://gmousse.gitbooks.io/dataframe-js/content/doc/api/dataframe.html
I have paste the code into a .gs file in a script1.
this code works in script1.
function test(){
var data =[[1,2,3],['a','b','c']]
var DataFrame = dfjs.DataFrame
var df = new DataFrame(data)
}
But when add script1 as a library into script2 I can't use the code anymore.
function test(){
var data =[[1,2,3],['a','b','c']]
var DataFrame = script1.dfjs.DataFrame
var df = new DataFrame(data)
}
I'm getting this error
Error
ArgumentTypeError: Array while expecting DataFrame | Array | Object.
_construct @ dataframe-js 1.4.3.gs:3167
Wrapper @ dataframe-js 1.4.3.gs:3191
ArgumentTypeError @ dataframe-js 1.4.3.gs:4517
_build @ dataframe-js 1.4.3.gs:6813
DataFrame @ dataframe-js 1.4.3.gs:6665
I could just paste the code again. But why doesn't this work? Not sure if it is a dataframe-js issue or somehow I'm missing something simple.