ds = system.dataset.toDataSet(['Bin_No','Actual','Target'], [stringArray,TargetArray,ActualArray]) event.source.templateParams = ds
This creates a dataset of 3 columns- 'Bin_No','Actual','Target'. But the problem here is, the data from StringArray is written as a row, whereas I need it to be written as a column, NOW - How can I get the data in column format ??
The second argument to toDataSet is expected to a be a list of lists, in a format like this:
toDataSet
[ [R1C1, R1C2, ...], [R2C1, R2C2, ...], ... ]
You will need to add code to 'pivot' your three lists of values. Python's builtin zip function may be useful to you.
zip
Thanks @PGriffith The zip function on the second argument did the job.