DataSeries/convert - Maple Programming Help

Home : Support : Online Help : Statistics and Data Analysis : DataFrames and DataSeries : DataSeries Commands : DataSeries/convert

DataSeries/convert

conversions to and from DataSeries

 Calling Sequence convert( expr, DataSeries ) convert( ds, typ )

Parameters

 expr - a list, Array, Vector or table ds - DataSeries

Description

 • The convert command can convert certain types of expressions expr to a DataSeries, and can convert a DataSeries ds to certain other types typ.
 • The convert( expr, DataSeries ) form of the command converts an expression expr, of type list, Array, Vector or table, to a DataSeries object. Note that the order of the elements in the resulting DataSeries is not well-defined in the case that expr is a table.
 • A DataSeries ds can be converted to a list, set, Array, Vector or Matrix.

Examples

 > $\mathrm{ds}≔\mathrm{convert}\left(\left[1,2,3\right],\mathrm{DataSeries}\right)$
 ${\mathrm{ds}}{≔}\left[\begin{array}{cc}{1}& {1}\\ {2}& {2}\\ {3}& {3}\end{array}\right]$ (1)
 > $\mathrm{type}\left(\mathrm{ds},\mathrm{DataSeries}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{convert}\left(⟨1,2,3⟩,\mathrm{DataSeries}\right)$
 $\left[\begin{array}{cc}{1}& {1}\\ {2}& {2}\\ {3}& {3}\end{array}\right]$ (3)
 > $\mathrm{convert}\left(\mathrm{table}\left(\left[a=1,b=2,c=3\right]\right),\mathrm{DataSeries}\right)$
 $\left[\begin{array}{cc}{a}& {1}\\ {b}& {2}\\ {c}& {3}\end{array}\right]$ (4)
 > $\mathrm{convert}\left(\mathrm{ds},'\mathrm{list}'\right)$
 $\left[{1}{,}{2}{,}{3}\right]$ (5)
 > $\mathrm{convert}\left(\mathrm{ds},'\mathrm{Array}'\right)$
 $\left[\begin{array}{ccc}{1}& {2}& {3}\end{array}\right]$ (6)
 > $\mathrm{convert}\left(\mathrm{ds},'\mathrm{Vector}\left[\mathrm{row}\right]'\right)$
 $\left[\begin{array}{ccc}{1}& {2}& {3}\end{array}\right]$ (7)
 > $\mathrm{convert}\left(\mathrm{ds},'\mathrm{Matrix}'\right)$
 $\left[\begin{array}{c}{1}\\ {2}\\ {3}\end{array}\right]$ (8)

Compatibility

 • The DataSeries/convert command was introduced in Maple 2016.