traitsui.ui_editors.data_frame_editor module¶
-
class
traitsui.ui_editors.data_frame_editor.
DataFrameAdapter
¶ Bases:
traitsui.tabular_adapter.TabularAdapter
Generic tabular adapter for data frames
-
alignment
= Property(Enum('left', 'center', 'right'))¶ The alignment for each cell
-
delete
(object, trait, row)¶ Override the base implementation to work with DataFrames
Unavoidably does a copy of the data, setting the trait with the new value.
-
font
= Property¶ The font to use for each column
-
format
= Property¶ The format to use for each column
-
get_item
(object, trait, row)¶ Override the base implementation to work with DataFrames
This returns a dataframe with one row, rather than a series, since using a dataframe preserves dtypes.
-
index_alignment
= Property¶ The alignment to use for a row index.
-
index_text
= Property¶ The text to use for a row index.
-
insert
(object, trait, row, value)¶ Override the base implementation to work with DataFrames
Unavoidably does a copy of the data, setting the trait with the new value.
-
text
= Property¶ The text to use for a generic entry.
-
-
class
traitsui.ui_editors.data_frame_editor.
DataFrameEditor
(*args, **traits)¶ Bases:
traitsui.basic_editor_factory.BasicEditorFactory
Editor factory for basic data frame editor
-
columns
= List()¶ Optional list of either column ID or pairs of (column title, column ID).
-
editable
= Bool(False)¶ Whether or not the entries can be edited.
-
fonts
= Either(Font, Dict, default='Courier 10')¶ The font for each element, or a mapping column ID to font.
-
formats
= Either(Str, Dict, default='%s')¶ The format for each element, or a mapping column ID to format.
-
klass
= Property¶ The editor implementation class.
-
show_index
= Bool(True)¶ Should an index column be displayed.
-
show_titles
= Bool(True)¶ Should column headers be displayed.
-