Row¶
A one-dimensional collection of named, heterogeneous values.
You only need to interact with this class in callbacks passed to higher-order functions.
Stub code in Row.sdsstub
columnCount¶
The number of columns.
Type: Int
columnNames¶
The names of the columns.
Type: List<String>
schema¶
The schema of the row, which is a mapping from column names to their types.
Type: Schema
getCell¶
Get the cell in the specified column. This is equivalent to the [] operator (indexed access).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name |
String |
The name of the column. | - |
Results:
| Name | Type | Description |
|---|---|---|
cell |
Cell<Any> |
The cell in the specified column. |
Examples:
pipeline example {
val table = Table({"col1": [1, 2], "col2": [3, 4]});
out table.removeRows((row) -> row.getCell("col1") == 1);
out table.removeRows((row) -> row["col1"] == 1);
}
Stub code in Row.sdsstub
getColumnType¶
Get the type of a column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name |
String |
The name of the column. | - |
Results:
| Name | Type | Description |
|---|---|---|
type |
ColumnType |
The type of the column. |
Stub code in Row.sdsstub
hasColumn¶
Check if the row has a column with a specific name. This is equivalent to the in operator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name |
String |
The name of the column. | - |
Results:
| Name | Type | Description |
|---|---|---|
hasColumn |
Boolean |
Whether the row has a column with the specified name. |