ExampleTable
Bases: Table
A Table
with descriptions for its columns.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table |
Table
|
The table. |
required |
column_descriptions |
dict[str, str]
|
A dictionary mapping column names to their descriptions. |
required |
Raises:
Type | Description |
---|---|
UnknownColumnNameError
|
If a column name in |
Source code in src/safeds_examples/tabular/containers/_example_table.py
column_descriptions: Table
property
¶
Return a Table
contain the name of a column and its description.
The name is stored in a column called "Name"
and the description in a column called "Description"
.
__init__(table, column_descriptions)
¶
Source code in src/safeds_examples/tabular/containers/_example_table.py
get_column_description(column_name)
¶
Get the description of a column. If no description exists, an empty string is returned.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
column_name |
str
|
The name of the column. |
required |
Returns:
Name | Type | Description |
---|---|---|
description |
str
|
The description of the column. |
Raises:
Type | Description |
---|---|
UnknownColumnNameError
|
If no column with the given name exists. |