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

Online Help

DataFrame/ColumnLabels

obtain column labels of a DataFrame

DataFrame/RowLabels

obtain row labels of a DataFrame

DataFrame/SubsColumnLabel

create a DataFrame with a different column label

DataFrame/SubsRowLabel

create a DataFrame with a different row label

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ColumnLabels(DF)

ColumnLabels(DF, i)

SubsColumnLabel(DF, i, label)

RowLabels(DF)

RowLabels(DF, i)

SubsRowLabel(DF, i, label)

Parameters

DF

-

a DataFrame object

i

-

a nonzero integer or valid row or column label

label

-

a new label

Description

• 

The ColumnLabels command returns the list of column labels for a DataFrame object, or a single column label. A single label is specified by its position.

• 

The RowLabels command returns the list of row labels for a DataFrame object, or a single row label. A single label is specified by its position.

• 

The SubsColumnLabel command creates a DataFrame object with a different column label.

• 

The SubsRowLabel command creates a DataFrame object with a different row label.

• 

Note: the SubsColumnLabel and SubsRowLabel commands do not modify the given DataFrame object DF - they just return new DataFrame objects. See the Examples section below.

• 

If i is a negative integer, it specifies the position counting from the end. For example, -2 specifies the label before last.

Examples

(1)

(2)

(3)

(4)

(5)

The statements below does not modify .

(6)

(7)

(8)

(9)

(10)

We can make the change apply to  by assigning the result to .

(11)

(12)

(13)

(14)

Compatibility

• 

The DataFrame/ColumnLabels, DataFrame/RowLabels, DataFrame/SubsColumnLabel and DataFrame/SubsRowLabel commands were introduced in Maple 2016.

• 

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

See Also

DataFrame

DataFrame/Constructor

DataFrame/indexing

DataSeries/Labels

 


Download Help Document