Table, Columns, Rows#
- class emtools.metadata.Table(columns=None)#
Class to hold and manipulate tabular data.
- addColumns(*args)#
Add one or many columns.
- Each argument should be in the form:
columnName=value
where value can be a constant or another column.
Examples
table.addColumns(‘rlnDefocusU=rlnDefocusV’, ‘rlnDefocusAngle=0.0’)
- addRow(row)#
Add a new Row.
- addRowValues(*args, **kwargs)#
Append a new Row from the given values.
- clearRows()#
Remove all the rows from the table, but keep its columns.
- getColumnValues(colName)#
Return the values of a given column
- Parameters:
colName – The name of an existing column to retrieve values.
- Returns:
A list with all values of that column.
- removeColumns(*args)#
Remove columns with these names.
- sort(key, reverse=False)#
Sort the table in place using the provided key. If key is a string, it should be the name of one column.