Warning

🚧 Sprout is still in active development and evolving quickly, so the documentation and functionality may not work as described and could undergo substantial changes 🚧

core.TableDialectProperties

core.TableDialectProperties(
    self,
    header=None,
    header_rows=None,
    header_join=None,
    comment_rows=None,
    comment_char=None,
    delimiter=None,
    line_terminator=None,
    quote_char=None,
    double_quote=None,
    escape_char=None,
    null_sequence=None,
    skip_initial_space=None,
    property=None,
    item_type=None,
    item_keys=None,
    sheet_number=None,
    sheet_name=None,
    table=None,
)

Table dialect describes how tabular data is stored in a file.

It supports delimited text files like CSV, semi-structured formats like JSON and YAML, and spreadsheets like Microsoft Excel.

Attributes

header : bool | None

Specifies if the file includes a header row, always as the first row in the file.

header_rows : list[int] | None

Specifies the row numbers for the header.

header_join : str | None

Specifies how multiline-header files have to join the resulting header rows.

comment_rows : list[int] | None

Specifies what rows have to be omitted from the data.

comment_char : str | None

Specifies that any row beginning with this one-character string, without preceding whitespace, causes the entire line to be ignored.

delimiter : str | None

A character sequence to use as the field separator.

line_terminator : str | None

Specifies the character sequence that must be used to terminate rows.

quote_char : str | None

Specifies a character to use for quoting in case the delimiter is used inside a data cell.

double_quote : bool | None

Controls the handling of quote_char inside data cells. If true, two consecutive quotes are interpreted as one.

escape_char : str | None

Specifies a one-character string to use as the escape character. Mutually exclusive with quote_char.

null_sequence : str | None

Specifies the null sequence, for example, \N.

skip_initial_space : bool | None

Specifies the interpretation of whitespace immediately following a delimiter. If false, whitespace immediately after a delimiter should be treated as part of the subsequent field.

property : str | None

Specifies where a data array is located in the data structure.

item_type : Literal['array', 'object'] | None

Specifies whether property contains an array of arrays or an array of objects.

item_keys : list[str] | None

Specifies the keys for extracting rows from data arrays where item_type is object.

sheet_number : int | None

Specifies the sheet number of a table in a spreadsheet file.

sheet_name : str | None

Specifies the sheet name of a table in a spreadsheet file.

table : str

Specifies the name of a table in a database.

Methods

Name Description
default Creates an instance with default values.

default

core.TableDialectProperties.default()

Creates an instance with default values.

Returns

: Self

A TableDialectProperties object with default values