qubx :: table :: SimpleTable :: Class SimpleTable
[hide private]
[frames] | no frames]

Class SimpleTable

source code

object --+    
         |    
     Table --+
             |
            SimpleTable
Known Subclasses:

Implements Table by storing all rows and fields internally.

Instance Methods [hide private]
 
__init__(self, label, auto_add_fields=False, auto_default=0.0, auto_accept=<__builtin__.function object>, auto_format=<__builtin__.function object>, global_name='', sortable=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
get_size(self) source code
 
add_field(self, name, default, accept, format, units, choices=None, independent=False)
Adds a column.
source code
 
remove_field(self, name) source code
 
insert(self, i, entry, undoing=False) source code
 
remove(self, i, undoing=False, renumber=True) source code
 
get(self, i, field_name) source code
 
set(self, i, field_name, val, undoing=False) source code
 
get_row(self, i, safenames=False)
Returns a the i'th TableRow.
source code
 
clone(self) source code

Inherited from Table: __getitem__, __iter__, __len__, __setitem__, __str__, add_field_to_stats, add_notebook_item, all_rows, append, calc_expr_values, check_rows_if, clear, copy_rows_from, dispose, from_json, from_text, get_by_name, get_row_by_name, index, nb_get_caption, nb_get_col, nb_get_col_format, nb_get_headers, nb_get_row, nb_get_shape, nb_get_type, remove_field_from_stats, rows_meeting_criteria, select, set_checked, set_global_name, to_json, to_text

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Instance Variables [hide private]
  entries
list of entries; each entry is a dict from field_name to value

Inherited from Table: OnAddField, OnAfterInsert, OnChecked, OnDoubleClick, OnInsert, OnRemoved, OnRemoving, OnRemovingField, OnSelect, OnSet, accept, all_stats, checked, choices, count_in_group, default, field_stats, fields, fields_independent, format, global_name, group_stats, groups_occupied, label, mean, median, mode, rows_in_group, size, sortable, std, units, user_can_remove

Properties [hide private]
  auto_accept
  auto_add_fields
  auto_default
  auto_format

Inherited from Table: custom, max_bools, max_fields, notebook, notebook_items

Inherited from object: __class__

Method Details [hide private]

__init__(self, label, auto_add_fields=False, auto_default=0.0, auto_accept=<__builtin__.function object>, auto_format=<__builtin__.function object>, global_name='', sortable=False)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

add_field(self, name, default, accept, format, units, choices=None, independent=False)

source code 

Adds a column.

Parameters:
  • name - column label
  • default - default value
  • accept - f(str) -> value; can raise Exception on invalid input
  • format - f(value) -> str, or a printf-style format string (e.g. "%.6g")
  • units - string
  • choices - a list of acceptable values, or None to just use the accept function
  • independent - True if the field can be used as the independent variable

insert(self, i, entry, undoing=False)

source code 
Overrides: Table.insert

remove(self, i, undoing=False, renumber=True)

source code 
Overrides: Table.remove

get(self, i, field_name)

source code 
Overrides: Table.get

set(self, i, field_name, val, undoing=False)

source code 
Overrides: Table.set

get_row(self, i, safenames=False)

source code 

Returns a the i'th TableRow.

Overrides: Table.get_row