DataFrame/numelems
return the number of elements in a DataFrame
DataFrame/lowerbound
return the index of the first element in a DataFrame
DataFrame/upperbound
return the index of the last element in a DataFrame
Calling Sequence
Parameters
Description
Examples
Compatibility
numelems( df )
lowerbound( df )
lowerbound( df, dim )
upperbound( df )
upperbound( df, dim )
df
-
a DataFrame object
dim
a positive integer (1 or 2)
The numelems( df ) command returns the number of elements in the DataFrame df. This is defined to be the number of individual data items in the DataFrame df, not the number of columns of df.
The lowerbound( df, dim ) command returns the index, which is always equal to 1, of the first element of the DataFrame df in dimension dim, which must be either 1 or 2.
The upperbound( df, dim ) command returns the index of the last element of the DataFrame df in dimension dim, which must be either 1 or 2. If dim is equal to 1, then the number of rows of df is returned. If dim is equal to 2, then the number of columns of df is returned.
Note that, for a DataFrame df, numelems( df ) is equal to upperbound( df, 1 ) * upperbound( df, 2 ), which is just the product of the numbers of rows and columns of df.
df≔DataFrame⁡1|2|3,4|5|6
df≔12311232456
numelems⁡df
6
lowerbound⁡df
1,1
upperbound⁡df,1
2
upperbound⁡df,2
3
The DataFrame/numelems, DataFrame/lowerbound and DataFrame/upperbound commands were introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
See Also
DataFrame
Download Help Document