danfo.readCSV
Reads a comma-separated values (CSV) file into DataFrame. Also supports the reading of CSV files in chunks.
Last updated
Reads a comma-separated values (CSV) file into DataFrame. Also supports the reading of CSV files in chunks.
Last updated
danfo.readCSV(source, options)
The readCSV method can read a CSV file from a local disk, or over the internet (URL). Reading of local files is only supported in Nodejs, while reading of input file objects is only supported in the browser.
By specifying a valid file path, you can load CSV files from local disk:
By specifying a valid URL, you can load CSV files from any location into Danfo**'**s data structure:
By specifying a valid file object, you can load CSV files in the browser in DataFrames/Series
Parameters
Type
Description
Default
source
File object, File path, URL
Any valid string path is acceptable. The string could be a URL or a valid local file path.
A browser input file object is also supported.
options
object, optional
Supports all Papaparse config parameters. See https://www.papaparse.com/docs#config.
{
header: true
}