deephaven_enterprise.pivot.pivot_table¶
The pivot_table module allows you to create a PivotTable
using make_pivot()
.
- class PivotServicePlugin[source]¶
Bases:
JObjectWrapper
A Python Wrapper for the PivotServicePlugin.
It is not intended for the worker to interact with this object directly, but rather for it to be made available as a session variable for plugin clients to create new pivots.
- j_object_type¶
alias of
PivotServicePlugin
- class PivotTable(j_pivot)[source]¶
Bases:
JObjectWrapper
A PivotTable aggregates data in two dimensions. The row by-columns form rows of the table, with each column producing a hierarchical set of rows. Similarly, the column by-columns form columns of the table, forming a hierarchical set of columns.
- filter(filters)[source]¶
Filter this PivotTable and produce a new PivotTable.
- j_object_type¶
alias of
PivotTable
- sort_cols(order_by, order=None)[source]¶
Sort the columns of this table and produce a new PivotTable.
- Parameters:
- Return type:
- Returns:
a new PivotTable
- make_pivot(source, aggregations, row_by_columns, column_by_columns)[source]¶
Create a new PivotTable.
- Parameters:
source (Table) – The table to aggregate.
aggregations (list[Aggregation]) – The list of aggregations to perform.
row_by_columns (list[str]) – The columns that serve as key columns for the row aggregations. Each unique value (and unique value prefix) creates another row in the output grid.
column_by_columns (list[str]) – The columns that serve as key columns for the column aggregations. Each unique value (and unique value prefix) creates another (logical) column in the output grid.
- Returns:
A new PivotTable instance.
- Return type: