Package qubx :: Module notebook :: Class NbTable
[hide private]
[frames] | no frames]

Class NbTable

source code

     object --+        
              |        
util_types.Anon --+    
                  |    
             NbItem --+
                      |
                     NbTable
Known Subclasses:

A notebook item with tabular data. Subclasses NbChart and NbTrace define series using this underlying table of data.

get_caption: function() -> str, returns caption for the table
get_shape: function() -> (rows, columns), returns dimensions
get_headers: function() -> list of str, returns column headers
get_row: function(r) -> list, returns a row of data
get_col: function(c) -> list, returns a column of data
         (When creating an NbTable, provide either get_row or get_col and the other will be auto-generated;
          when using an NbTable, both get_row and get_col are available.)
get_col_format: function(c) -> (function(val) -> str), returns a function which formats values from column c as strings (by default, the str function)
get_type: function() -> type; returns e.g. float or str

Instance Methods [hide private]
 
__init__(self, mnu_caption, global_name, get_caption, get_shape, get_headers, get_row=None, get_col=None, get_col_format=None, get_type=None, **kw)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__get_type(self) source code
 
__get_col_format(self, c) source code
 
__get_col(self, c) source code
 
__get_row(self, r) source code
 
__to_txt(self) source code

Inherited from NbItem: __str__

Inherited from util_types.Anon: __getattr__, __repr__, clone

Inherited from util_types.Anon (private): _find_arg_dicts, _str_indent

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, mnu_caption, global_name, get_caption, get_shape, get_headers, get_row=None, get_col=None, get_col_format=None, get_type=None, **kw)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)