TableWithDescriptions
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 |
|---|---|
ColumnNotFoundError
|
If a column name in |
Source code in src/safeds_datasets/tabular/containers/_table_with_descriptions.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".
data: Table
property
¶
The data.
__init__(table, column_descriptions)
¶
Source code in src/safeds_datasets/tabular/containers/_table_with_descriptions.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 |
|---|---|---|
column_description |
str
|
The description of the column. |
Raises:
| Type | Description |
|---|---|
ColumnNotFoundError
|
If no column with the given name exists. |