eelbrain.Dataset.as_table
- Dataset.as_table(cases=0, fmt='%.6g', sfmt='%s', sort=False, header=True, midrule=False, count=False, title=None, caption=None, ifmt='%s', bfmt='%s', lfmt=False, nan=None)
Create an fmtxt.Table containing all Vars and Factors in the Dataset.
Can be used for exporting in different formats such as csv.
- Parameters:
cases (int | Iterable[int]) – Cases to include (int includes that many cases from the beginning, 0 includes all; negative number works like negative indexing).
fmt (str) – Format string for float variables (default
'%.6g'
).sfmt (str | None) – Formatting for strings (None -> code; default
'%s'
).sort (bool) – Sort the columns alphabetically.
header (bool) – Include the varibale names as a header row.
midrule (bool) – print a midrule after table header.
count (bool) – Add an initial column containing the case number.
title (str) – Title for the table.
caption (str) – Caption for the table (default is the Dataset’s caption).
ifmt (str) – Formatting for integers (default
'%s'
).bfmt (str) – Formatting for booleans (default
'%s'
).lfmt (bool) – Include Datalists.
nan (str) – Label to write for NaN.