Close
Close window
CSV - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

Comma-Separated Values (.csv) File Format

Comma-Separated Values

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

1234561Mar 06 01:16 3/7/200526.860912411.414301472×1071.505894402×1070.06482Mar 06 20:12 3/7/200525.756241812.358229695×1072.497614407×1070.05913Mar 06 20:43 3/7/200525.127064283.029212316×1073.314477184×1070.09424Mar 07 00:25 3/7/200525.122490952.496855419×1072.656019993×1070.06375Mar 07 00:44 3/7/200522.759192762.722498752×1072.818590004×1070.03536Mar 07 00:59 3/7/200522.206311129.859010832×1071.029975998×1070.04477Mar 08 00:15 3/8/200522.114772988.333640321×1078.579230226×1070.02958Mar 08 00:16 3/8/200521.412271131.174272859×1071.217998806×1070.03729Mar 08 00:16 3/8/200521.332533154.950350549×1065.239008009×1070.058310Mar 08 00:16 3/8/200520.627523091.765508208×1071.870092003×1070.059228 x 6 DataFrame

(1)

Import a CSV file as a Matrix .

>

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

Mar 06 01:16 3/7/200526.860912411.414301472×1071.505894402×1070.0648Mar 06 20:12 3/7/200525.756241812.358229695×1072.497614407×1070.0591Mar 06 20:43 3/7/200525.127064283.029212316×1073.314477184×1070.0942Mar 07 00:25 3/7/200525.122490952.496855419×1072.656019993×1070.0637Mar 07 00:44 3/7/200522.759192762.722498752×1072.818590004×1070.0353Mar 07 00:59 3/7/200522.206311129.859010832×1071.029975998×1070.0447Mar 08 00:15 3/8/200522.114772988.333640321×1078.579230226×1070.0295Mar 08 00:16 3/8/200521.412271131.174272859×1071.217998806×1070.0372Mar 08 00:16 3/8/200521.332533154.950350549×1065.239008009×1070.0583Mar 08 00:16 3/8/200520.627523091.765508208×1071.870092003×1070.059228 × 6 Matrix

(2)

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

>

PLinearAlgebra:-RandomMatrix100,3

P−80−79−38−197591−62−85−181−19632257−235083−6378−45−26−86830−905810−81−4322100 × 3 Matrix

(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.


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /