code: function toArrayOfRows(columnValueArrays, columnNames) {
    if (columnValueArrays.length < 1) {
      return;
    }
    const rows = columnValueArrays[0].map(function(value0, rowIndex) {
      return columnValueArrays.map(function(values) {
        return values[rowIndex];
      });
    });
    rows.unshift(columnNames);
    return rows;
  }
docs: Convert an array of column values, with column names, to an array of row values.
  @param  {Array[]} columnValueArrays Array of column values, eg. [[1,2,3], [4,5,6]].
  @param  {String[]} columnNames Array of column names, eg ['x', 'y'].
  @return {Array[]} Array of rows, starting with the column names, eg. [['x', 'y'], [1, 4], [2, 5], [3, 6]].