msticpy.vis.data_viewer_panel module
Dataframe viewer using Panel Tabulator.
- class msticpy.vis.data_viewer_panel.DataTableColumnChooser(data, selected_cols=None)
Bases:
object
DataTableColumnChooser class.
Initialize the DataTableColumnChooser class.
- property dataframe_columns
Return the selected set of DataFrame columns.
- display()
Display in IPython.
- property selected_columns: List[str]
Return a list of Bokeh column definitions for the DataFrame.
- class msticpy.vis.data_viewer_panel.DataViewer(data: DataFrame, selected_cols: List[str] | None = None, **kwargs)
Bases:
object
Data viewer class.
Initialize the DataViewer class.
- Parameters:
data (pd.DataFrame) – The DataFrame to view
selected_cols (List[str], optional) – Initial subset of columns to show, by default None (all cols)
selectable (Union[bool, str], optional) – Whether rows should be selectable, by default “checkbox”
show_index (bool, optional) – If True show the DataFrame index as a column, by default True.
show_tenant_id (bool, optional) – If True show the TenantId column, by default False.
max_col_width (int, optional) – Sets the maximum column width to display, by default 500
detail_cols (List[str]) – List of columns for which details are displayed in collapsible field beneath each table row.
kwargs – Other keyword arguments are passed to the panel Tabulator control.
Notes
Main attributes: value - original dataframe selected - indexes of currently selected rows selected_dataframe - currently selected rows current_view - current dataframe after filtering and sorting selection - indexes of currently selected rows
See also
Tabulator
- display()
Display the widget.