Skip to content

Better error for Column.stability if the Column contains only null values #319

@Marsmaennchen221

Description

@Marsmaennchen221

Is your feature request related to a problem?

If you perform the Column.stability method on a column that contains only null values the following error is raised: IndexError: list index out of range. This error does not describe the issue at all.

from safeds.data.tabular.containers import Column

column = Column("column", [None, None])

print(column.stability())

Desired solution

The docstring of the method should clarify that the stability is not defined if a column contains only null values.
The method should raise a ValueError if the column contains only null values.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Labels

releasedIncluded in a release

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions