diff --git a/src/safeds/data/tabular/containers/_column.py b/src/safeds/data/tabular/containers/_column.py index a4f198f06..ec4392c6b 100644 --- a/src/safeds/data/tabular/containers/_column.py +++ b/src/safeds/data/tabular/containers/_column.py @@ -504,7 +504,7 @@ def stability(self) -> float: \frac{\text{number of occurrences of most common non-null value}}{\text{number of non-null values}} $$ - The stability cannot be calculated for a column with only null values. + The stability is not definded for a column with only null values. Returns ------- @@ -520,7 +520,7 @@ def stability(self) -> float: raise ColumnSizeError("> 0", "0") if self.all(lambda x: x is None): - raise ValueError("Stability cannot be calculated for a column with only null values.") + raise ValueError("Stability is not definded for a column with only null values.") return self._data.value_counts()[self.mode()[0]] / self._data.count() diff --git a/tests/safeds/data/tabular/containers/_column/test_stability.py b/tests/safeds/data/tabular/containers/_column/test_stability.py index 7de0050d9..abb9f346f 100644 --- a/tests/safeds/data/tabular/containers/_column/test_stability.py +++ b/tests/safeds/data/tabular/containers/_column/test_stability.py @@ -33,5 +33,5 @@ def test_should_raise_column_size_error_if_column_is_empty() -> None: def test_should_raise_value_error_if_column_contains_only_none() -> None: column: Column[Any] = Column("A", [None, None]) - with pytest.raises(ValueError, match="Stability cannot be calculated for a column with only null values."): + with pytest.raises(ValueError, match="Stability is not definded for a column with only null values."): column.stability()