eelbrain.Dataset.as_table

Dataset.as_table(self, cases=0, fmt='%.6g', sfmt='%s', sort=False, header=True, midrule=False, count=False, title=None, caption=None, ifmt='%s', bfmt='%s', lfmt=False)

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 | iterator of 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 : None | str

Title for the table.

caption : None | 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.