length
utilityReturns the length of arrays, strings, objects, or DataFrame height
Syntax
length(value) Parameters
value (array | string | object | DataFrame) The value to measure
Returns
number The length/size of the input value
Examples
Get length of an array
Input:
[1, 2, 3] | length Output:
3 Get length of a string
Input:
"hello" | length Output:
5 Get number of rows in DataFrame
Input:
. | length Output:
10 The length() function returns the size or length of various data types including arrays, strings, objects, and DataFrames.
Usage
Use length() to count elements in arrays, characters in strings, properties in objects, or rows in DataFrames.