deephaven.table_factory¶
This module provides various ways to make a Deephaven table.
- class DynamicTableWriter(col_defs)[source]¶
Bases:
deephaven._wrapper.JObjectWrapper
The DynamicTableWriter creates a new in-memory table and supports writing data to it.
This class implements the context manager protocol and thus can be used in with statements.
- j_object_type¶
alias of
io.deephaven.engine.table.impl.util.DynamicTableWriter
- write_row(*values)[source]¶
Writes a row to the newly created table.
The type of a value must be convertible (safely or unsafely, e.g. lose precision, overflow, etc.) to the type of the corresponding column.
- Parameters
*values (Any) – the values of the new row, the data types of these values must match the column definitions of the table
- Raises
DHError –
- Return type
None
- merge(tables)[source]¶
Combines two or more tables into one aggregate table. This essentially appends the tables one on top of the other. Null tables are ignored.
- merge_sorted(tables, order_by)[source]¶
Combines two or more tables into one sorted, aggregate table. This essentially stacks the tables one on top of the other and sorts the result. Null tables are ignored. mergeSorted is more efficient than using merge followed by sort.
- new_table(cols)[source]¶
Creates an in-memory table from a list of input columns. Each column must have an equal number of elements.
- Parameters
cols (List[InputColumn]) – a list of InputColumn
- Return type
- Returns
a Table
- Raises
DHError –