Skip to content

Base options

Base configuration options shared by all DataFrame exporters.

These options control how structural metadata such as index, headers, and metaframe information are written to the output format. Subclasses may extend this dataclass with additional format-specific parameters.

Parameters:

Name Type Description Default
index bool | None

Whether to write the row index. If None, the exporter decides automatically: - tables -> False - non-tables -> True

None
header bool

Whether to write column headers.

True
extensive bool | None

Whether to include full metaframe information (MFR/MFC metadata) when exporting. If None, automatically disabled for tables and enabled for non-tables.

None
Source code in metaframe/src/utils/opts_dataclass/export.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@dataclass(slots=True)
class ExportOptions:
    """
    Base configuration options shared by all DataFrame exporters.

    These options control how structural metadata such as index, headers,
    and metaframe information are written to the output format. Subclasses
    may extend this dataclass with additional format-specific parameters.

    Parameters
    ----------
    index : bool | None, default None
        Whether to write the row index.
        If None, the exporter decides automatically:
        - tables -> False
        - non-tables -> True
    header : bool, default True
        Whether to write column headers.
    extensive : bool | None, default None
        Whether to include full metaframe information (MFR/MFC metadata)
        when exporting.
        If None, automatically disabled for tables and enabled for non-tables.
    """
    output: str | None = None
    index: bool | None = None
    header: bool = True
    extensive: bool | None = None
    kwargs: Dict[str, Any] = field(default_factory=dict, kw_only=True)