msticpy.vis.data_viewer module
Dataframe viewer.
- class msticpy.vis.data_viewer.DataTableColumnChooser(data, selected_cols=None)
Bases:
object
DataTableColumnChooser class.
Initialize the DataTableColumnChooser class.
- property dataframe_columns
Return the selected set of DataFrame columns.
- property datatable_columns
Return a list of Bokeh column definitions for the DataFrame.
- display()
Display in IPython.
- property selected_columns
Return the selected columns.
- class msticpy.vis.data_viewer.DataTableFilter(data: DataFrame)
Bases:
object
Data filtering class.
Initialize the DataTableFilter class.
- property bool_filters
Return current set of boolean filters.
- property current_col
Return the currently selected column.
- display()
Display in IPython.
- import_filters(filters: Dict[str, FilterExpr])
Replace the current filters with filters.
- Parameters:
filters (Dict[str, FilterExpr]) – dict of filter name, FilterExpr FilterExpr is a tuple of: column [str], inv [bool], operator [str], expr [str]
- class msticpy.vis.data_viewer.DataViewerBokeh(data: DataFrame, selected_cols: List[str] | None = None, debug=False)
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)
debug (bool) – Output additional debugging info to std out.
- display()
Display the widget.
- property filters: Dict[str, FilterExpr]
Return current filters as a dict.
- import_filters(filters: Dict[str, FilterExpr])
Import filter set replacing current filters.
- Parameters:
filters (Dict[str, FilterExpr]) – dict of filter name, FilterExpr FilterExpr is a tuple of: column [str], inv [bool], operator [str], expr [str]
- show()
Display the data table control.
- class msticpy.vis.data_viewer.FilterExpr(column, inv, operator, expr)
Bases:
tuple
Create new instance of FilterExpr(column, inv, operator, expr)
- column
Alias for field number 0
- count(value, /)
Return number of occurrences of value.
- expr
Alias for field number 3
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- inv
Alias for field number 1
- operator
Alias for field number 2