Skip to content

NonNumericColumnError

Bases: TypeError

Exception raised for trying to do numerical operations on a non-numerical column.

Source code in src/safeds/exceptions/_data.py
class NonNumericColumnError(TypeError):
    """Exception raised for trying to do numerical operations on a non-numerical column."""

    def __init__(self, column_info: str, help_msg: str | None = None) -> None:
        line_break = "\n"
        super().__init__(
            "Tried to do a numerical operation on one or multiple non-numerical columns:"
            f" \n{column_info}{line_break + help_msg if help_msg is not None else ''}",
        )