|
__init__(self,
default_value=0,
col_names=None,
row_names=None)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
create_rows(self,
row_names)
Appends row_names to the list of existing rows |
source code
|
|
|
create_columns(self,
col_names)
Appends col_names to the list of existing columns |
source code
|
|
|
create_row(self,
row_name=None)
Creates a rowname to the row_names list |
source code
|
|
|
create_column(self,
col_name)
Creates a colname to the col_names list |
source code
|
|
|
sort_by_column_id(self,
col_id,
method='asc')
Sorts the table (in-place) according to data stored in col_id |
source code
|
|
|
|
|
groupby(self,
colname,
*others)
builds indexes of data
:returns: nested dictionaries pointing to actual rows |
source code
|
|
|
|
|
|
|
set_cell(self,
row_index,
col_index,
data)
sets value of cell 'row_indew', 'col_index' to data |
source code
|
|
|
set_cell_by_ids(self,
row_id,
col_id,
data)
sets value of cell mapped by row_id and col_id to data
Raises a KeyError if row_id or col_id are not found in the table |
source code
|
|
|
|
|
|
|
|
|
insert_row(self,
index,
row_data,
row_name=None)
Appends row_data before 'index' in the table. |
source code
|
|
|
delete_row(self,
index)
Deletes the 'index' row in the table, and returns it.
Raises an IndexError if index is out of range |
source code
|
|
|
delete_row_by_id(self,
row_id)
Deletes the 'row_id' row in the table.
Raises a KeyError if row_id was not found. |
source code
|
|
|
|
|
|
|
|
|
|
|
delete_column(self,
index)
Deletes the 'index' column in the table, and returns it.
Raises an IndexError if index is out of range |
source code
|
|
|
delete_column_by_id(self,
col_id)
Deletes the 'col_id' col in the table.
Raises a KeyError if col_id was not found. |
source code
|
|
|
get_shape(self)
Returns a tuple which represents the table's shape |
source code
|
|
|
shape(self)
Returns a tuple which represents the table's shape |
source code
|
|
|
__getitem__(self,
indices)
provided for convenience |
source code
|
|
|
get_cell_by_ids(self,
row_id,
col_id)
Returns the element at [row_id][col_id] |
source code
|
|
|
get_row_by_id(self,
row_id)
Returns the 'row_id' row |
source code
|
|
|
get_column_by_id(self,
col_id,
distinct=False)
Returns the 'col_id' col |
source code
|
|
|
get_columns(self)
Returns all the columns in the table |
source code
|
|
|
get_column(self,
col_index,
distinct=False)
get a column by index |
source code
|
|
|
apply_stylesheet(self,
stylesheet)
Applies the stylesheet to this table |
source code
|
|
|
transpose(self)
Keeps the self object intact, and returns the transposed (rotated)
table. |
source code
|
|
|
pprint(self)
returns a string representing the table in a pretty
printed 'text' format. |
source code
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|