UnsupportedMissingError(type_name, column_name=None, advice=None)
Source¶
Bases: NumdaplotError
Raised when a missing value (None) is given for a type that cannot hold one in an Array.
Only integers and booleans cannot be missing in an Array. A Table accepts their missing values.
Added in version 0.1.0
Parameters:
-
type_name(str)Name of the
ndp.Typemember that cannot hold a missing value. -
column_name(str | None, default:None)Name of the Table column holding the missing values. When omitted, the values were given to an Array.
-
advice(str | None, default:None)
Attributes:
-
type_nameName of the
ndp.Typemember that cannot hold a missing value. -
column_nameName of the Table column holding the missing values, or
Nonefor values given to an Array.
Examples:
import numdaplot as ndp
try:
ndp.Array.from_list([1, None])
except ndp.UnsupportedMissingError as error:
print(error)
# INT64 values cannot be missing in an Array. Remove them, or give dtype=ndp.Type.FLOAT64.