Skip to main content
Version: Python

time_table

The time_table method creates a time table that adds new rows at a specified interval. The resulting table has one date-time column, Timestamp.

Syntax

time_table(
period: Union[dtypes.Duration, int, str, datetime.timedelta, np.timedelta64, pd.Timdelta],
start_time: Union[None, str, datetime.datetime, np.datetime64] = None,
blink_table: bool = False,
) -> Table

Parameters

ParameterTypeDescription
periodUnion[dtypes.Duration, int, str, datetime.timedelta, np.timedelta64, pd.Timdelta]

The time interval between new row additions. Can be given as:

start_time optionalUnion[None, str, datetime.datetime, np.datetime64

The value of the date-time in the first row of the table. String inputs must be given in syntax matching YYYY-MM-DDThh:mm:ss.dddddddd TZ.

danger

Setting start_time sufficiently far in the past, coupled with a short period, can cause the time table to instantly populate with a very large number of rows.

blink_table optionalbool

If the time table should be a blink table; defaults to False.

Returns

A ticking time table that adds new rows at the specified interval.

Example

The following example creates a time table that adds one new row every second.

from deephaven import time_table

result = time_table("PT1S")