Skip to main content
Version: Python

one_click_partitioned_table

The one_click_partitioned_table method creates a SelectableDataSet with the specified columns from a table map. This is useful in dynamic plotting, where Deephaven requires a SelectableDataSet instead of a standard table to execute certain operations.

Syntax

one_click_partitioned_table(
pt: PartitionedTable,
require_all_filters: bool = False
) -> SelectableDataSet

Parameters

ParameterTypeDescription
ptPartitionedTable

The source table.

require_all_filters optionalbool

Whether to display data when some, but not all, Input Filters are applied. False will display data when not all filters are selected; True will only display data when appropriate filters are selected.

Returns

A SelectableDataSet.

Examples

In this example, we create a source table, then use partition_by to create a partitioned table. Next, we use one_click_partitioned_table to create a SelectableDataSet copy of the table. Finally, we use plot_xy to turn our SelectableDataSet into a plot, which can then be filtered via Controls > Input Filter in the user interface.

from deephaven import read_csv
from deephaven.plot.selectable_dataset import one_click_partitioned_table
from deephaven.plot.figure import Figure

source = read_csv(
"https://media.githubusercontent.com/media/deephaven/examples/main/CryptoCurrencyHistory/CSV/CryptoTrades_20210922.csv"
)

partitioned_source = source.partition_by("Exchange")

oc = one_click_partitioned_table(pt=partitioned_source, require_all_filters=True)
plot = Figure().plot_xy(series_name="Plot", t=oc, x="Timestamp", y="Price").show()

img

Note that multiple filters can be used at once. For example:

img