DataSeries/Labels
obtain labels of a DataSeries
DataSeries/SubsLabel
create a DataSeries with a different label
Calling Sequence
Parameters
Description
Examples
Compatibility
Labels(DS)
Labels(DS, i)
SubsLabel(DS, i, label)
DS
-
a DataSeries object
i
a nonzero integer or valid label
label
a new label
The Labels command returns the list of labels for a DataSeries object, or a single label. A single label is specified by its position.
The SubsLabel command creates a DataSeries object with a different label. Note: this does not modify the given DataSeries object DS - it just returns a new DataSeries object. See the Examples section below.
If i is negative, it specifies the position counting from the end. For example, -2 specifies the label before last.
ds≔DataSeries⁡5,6,8,labels=a,b,c
ds≔a5b6c8
Labels⁡ds
a,b,c
Labels⁡ds,2
b
The statement below does not modify ds.
ds2≔SubsLabel⁡ds,1,z
ds2≔z5b6c8
Labels⁡ds2
z,b,c
We can make the change apply to ds by assigning the result to ds.
ds≔SubsLabel⁡ds,−1,y
ds≔a5b6y8
a,b,y
SubsLabel⁡ds,b,x
a5x6y8
The DataSeries/Labels and DataSeries/SubsLabel commands were introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
See Also
DataFrame/Labels
DataSeries
DataSeries/Constructor
DataSeries/indexing
Download Help Document