dataFrame.csv — parse()

Description

The parse() method of the csv object parses a CSV string and replaces the contents of the DataFrame with the parsed data.

Signature

dataFrame.csv.parse(csv, { columnDelimiter: ',' })
Scope
dataFrame
Family
csv
Returns
mutates

Argument

csv (string)
The CSV string to parse.
options (object)
CSV options.

Option

columnDelimiter (string)
The character used to separate columns in the CSV data. Default: "," .

Example

// store a CSV
var csv = `A,B,C
1,2,3
4,5,6`;

// create an empty dataFrame
var dataFrame = new DataFrame();

// parse the CSV and set result into the dataFrame
dataFrame.csv.parse(csv);

// display the CSV
notebook.output(dataFrame);