| title | new_table |
|---|
The new_table method creates an in-memory table from a list of columns. Each column must have an equal number of elements.
new_table(cols: list[InputColumn]) -> TableColumns are created using the following methods:
bool_colbyte_colchar_coldatetime_coldouble_colfloat_colint_collong_colpyobj_colshort_colstring_col
An in-memory table.
The following example creates a table with one column of three integer values.
from deephaven import new_table
from deephaven.column import int_col
result = new_table([int_col("IntegerColumn", [1, 2, 3])])The following example creates a table with a double and a string column.
from deephaven import new_table
from deephaven.column import string_col, double_col
result = new_table(
[
double_col("Doubles", [3.1, 5.45, -1.0]),
string_col("Strings", ["Creating", "New", "Tables"]),
]
)