convert - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


DataSets[Quandl][Reference]

  

convert

  

convert a reference to another data type

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

convert(ref, conversion, extra)

Parameters

ref

-

Quandl reference object

conversion

-

name; what to convert the data set to

extra

-

(optional) extra arguments for the conversion

Description

• 

The convert command can convert to a TimeSeries, DataFrame, an Array, a Matrix, or a listlist (a list of lists). If the data has only a single column, then it can also convert to a Vector (or a Vector[row] (a row vector)), or a list (a single, flat list).

• 

The conversion to TimeSeries accepts any number of extra arguments which are passed to the TimeSeries constructor call. You can use this to, for example, override the column names, by passing an argument of the form headers = my_headers, or to set the period if you expect a particular periodicity by passing an argument of the form period = n.

• 

The conversions to Array, Matrix, and Vector accept any number of extra arguments which are passed to the appropriate data structure constructor. You can use this to, for example, set the datatype of the new data structure by passing a datatype = d option.

Examples

withDataSets:

We create a reference by identifier.

refQuandl:-ReferenceFRED/CANPOPL

refData setPopulation in Canada (DISCONTINUED)Quandl FRED/CANPOPLup to 52 rows (annual), 1 column1960-01-01 - 2011-01-01

(1)

The data in this data set as a Matrix:

convertref,'Matrix'

We convert the data set to a TimeSeries and set the period to 3.

convertref,'TimeSeries','period'=3

Time seriesVALUE52 rows of data:1960-12-31 - 2011-12-31

(2)

ref2DataSets:-Referencequandl,PORDATA/01

ref2Data setPortugal Population, Population Census, Resident population by sexQuandl PORDATA/01up to 52 rows (annual), 3 columns1960-12-31 - 2011-12-31

(3)

The data in this second data reference as a DataFrame:

convertref2,DataFrame

TotalMalesFemales1960-12-318.8893920×1064.2544160×1064.6349760×1061970-12-318.6632520×1064.1093600×1064.5538920×1061981-12-319.8330140×1064.7377150×1065.0952990×1061991-12-319.8671470×1064.7567750×1065.1103720×1062001-12-311.03561170×1075.0001410×1065.3559760×1062011-12-311.05621780×1075.0466000×1065.5155780×106

(4)

Compatibility

• 

The DataSets[Quandl][Reference][convert] command was introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

DataSets