eelbrain.fmtxt.Table
- class eelbrain.fmtxt.Table(columns, rules=True, title=None, caption=None, rows=())
A table
- Parameters:
Examples
>>> from eelbrain import fmtxt >>> table = fmtxt.Table('lll') >>> table.cell() >>> table.cell("example 1") >>> table.cell("example 2") >>> table.midrule() >>> table.cell("string") >>> table.cell('???') >>> table.cell('another string') >>> table.cell("Number") >>> table.cell(4.5) >>> table.cell(2./3, fmt='%.4g') >>> print(table) example 1 example 2 ----------------------------------- string ??? another string Number 4.5 0.6667 >>> print(table.get_tex()) \begin{center} \begin{tabular}{lll} \toprule & example 1 & example 2 \\ \midrule string & ??? & another string \\ Number & 4.5 & 0.6667 \\ \bottomrule \end{tabular} \end{center} >>> table.save_tex()
Methods
|
Add a row without affecting the cursor |
|
Append another table (has to have same column specification) |
|
Set the table caption |
|
Add a cell to the table |
|
Add several simple cells with one command |
|
Copy PDF to clipboard |
|
Copy TeX to clipboard |
|
Finish the active row |
|
Generate a Table from a list of columns |
|
Complete HTML representation |
|
|
|
Convert Table to str |
|
TeX representation |
|
Render the table to tab-separated values (TSV) string |
|
Add a midrule |
|
Save table as |
|
Save in HTML format |
|
Save in PDF format |
|
Save in Rich Text format |
|
Save in TeX format |
|
Save the table as tab-separated values file |
|
Save the table as text file |
|
Set the table title |