🚧 Sprout is still in active development and evolving quickly, so the documentation and functionality may not work as described and could undergo substantial changes 🚧
TableDialectProperties
core.TableDialectProperties(self,
bool | None = None,
header: list[int] | None = None,
header_rows: str | None = None,
header_join: list[int] | None = None,
comment_rows: str | None = None,
comment_char: str | None = None,
delimiter: str | None = None,
line_terminator: str | None = None,
quote_char: bool | None = None,
double_quote: str | None = None,
escape_char: str | None = None,
null_sequence: bool | None = None,
skip_initial_space: property: str | None = None,
'array', 'object'] | None = None,
item_type: Literal[list[str] | None = None,
item_keys: int | None = None,
sheet_number: str | None = None,
sheet_name: str | None = None,
table: )
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
isobject
. 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