empty_table
The empty_table method creates an empty in-memory table with a specified number of rows.
Syntax
empty_table(size: int) -> Table
Parameters
| Parameter | Type | Description |
|---|---|---|
| size | int | The number of empty rows allocated. |
Returns
An empty in-memory table.
Example
The following example creates an empty in-memory table with five rows.
from deephaven import empty_table
result = empty_table(5)
The following example creates an empty in-memory table with five rows and then updates it to contain data.
from deephaven import empty_table
result = empty_table(5).update(formulas=["X = 5"])