dataFrame — set()
Description
The set() method of the dataFrame object replaces all rows in the DataFrame with the specified values.
Signature
dataFrame.set(values)- Scope
dataFrame- Family
core- Returns
mutates
Argument
values(array)- The data used to replace the current contents of the DataFrame. The value must be a 2D array.
Example
// create a 2D array of values
var values = [
['A', 'B'],
['C', 'D']
];
// create an empty dataFrame
var dataFrame = new DataFrame();
// set the values to the dataFrame
dataFrame.set(values);