ColumnNotFoundError(column_name, table_name=None)
Source¶
Bases: NumdaplotError
Raised when an operation names a column that the Table does not have.
Added in version 0.1.0
Parameters:
-
column_name(str)The name that matches no column.
-
table_name(str | None, default:None)The Table searched, such as
"the other Table"of a join. When omitted, only one Table is involved.
Attributes:
-
column_nameThe name that matches no column.
-
table_nameThe Table searched, or None.
Examples:
import numdaplot as ndp
table = ndp.Table.from_arrays({"price": ndp.Array.from_list([1, 2])})
try:
table.column("prise")
except ndp.ColumnNotFoundError as error:
print(error)
# No column is named 'prise'.