Comma-Separated Values (.csv) File Format - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Input and Output : File Formats : Formats/CSV

Comma-Separated Values (.csv) File Format

Comma-Separated Values

 

Description

Notes

Examples

Compatibility

Description

• 

CSV (Comma-Separated Values) is a simple text-based format for tabular data in which rows of data appear on subsequent lines and columns are delimited by commas.

• 

The ImportMatrix command recognizes two variants of CSV files, standard CSV and Microsoft CSV. For details on the differences between these formats, see sscanf.

• 

The ExportMatrix command can write tabular data to the CSV format.

• 

The general-purpose commands Import and Export also support this format.

• 

The default output from Import for this format is a DataFrame. To produce a Matrix, use Import(...,output=Matrix).

Notes

• 

Content-Type: text/csv, text/comma-separated-values

Examples

Import a CSV file as a DataFrame.

Importexample/timedata.csv,base=datadir

(1)

Import a CSV file as a Matrix.

Importexample/timedata.csv,base=datadir,output=Matrix

(2)

Export 100 random three-dimensional points to a CSV file in the home directory of the current user.

PLinearAlgebra:-RandomMatrix100,3

(3)

Exportpoints.csv,P,base=homedir

1025

(4)

Compatibility

• 

With Maple 2016, the Import command applied to CSV files now produces DataFrame objects by default.

See Also

ExportMatrix

Formats

Formats,tsv

ImportMatrix

sscanf