polychron.views.DatafilePreviewView
Module
DatafilePreviewView
Bases: PopupView
View for previewing the data in a loaded dataframe (i.e. csv).
Formerly popupWindow7
, called by numerous open_fileX
methods in StartPage
__init__
__init__(parent: Frame) -> None
Construct the view, without binding any callbacks
bind_load_button
bind_load_button(callback: Callable[[], Any]) -> None
Bind the callback for when the load_button is pressed
bind_cancel_button
bind_cancel_button(callback: Callable[[], Any]) -> None
Bind the callback for when the cancel_button is pressed
set_tree_data
set_tree_data(cols: List[str], rows: List[Tuple[str, List[str]]]) -> None
Update the data shown in the preview table/tree
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cols
|
List[str]
|
A list of column titles |
required |
rows
|
List[Tuple[str, List[str]]]
|
A list of row entries, where each row is a tuple of the the row index and the row data as a list of strings |
required |