dataFrame.csv — stringify()

Description

The stringify() method of the csv object converts the contents of the DataFrame into a CSV string.

Signature

dataFrame.csv.stringify()
Scope
dataFrame
Family
csv
Returns
string

Returns

csv (string)
A CSV representation of the DataFrame.

Example

// create a dataFrame with any 2D array
var rows = [
  ['A', 'B', 'C'],
  [1, 2, 3],
];
var dataFrame = new DataFrame(rows);

// convert data into a CSV string
var csv = dataFrame.csv.stringify();

// log the CSV
notebook.log(csv);