Exceptions#

Errors#

PolarsError

Base class for all Polars errors.

ColumnNotFoundError

Exception raised when a specified column is not found.

ComputeError

Exception raised when Polars could not perform an underlying computation.

DuplicateError

Exception raised when a column name is duplicated.

InvalidOperationError

Exception raised when an operation is not allowed (or possible) against a given object or data structure.

ModuleUpgradeRequiredError

Exception raised when a module is installed but needs to be upgraded.

NoDataError

Exception raised when an operation cannot be performed on an empty data structure.

NoRowsReturnedError

Exception raised when no rows are returned, but at least one row is expected.

OutOfBoundsError

Exception raised when the given index is out of bounds.

ParameterCollisionError

Exception raised when the same parameter occurs multiple times.

RowsError

Exception raised when the number of returned rows does not match expectation.

SQLInterfaceError

Exception raised when an error occurs in the SQL interface.

SQLSyntaxError

Exception raised from the SQL interface when encountering invalid syntax.

SchemaError

Exception raised when an unexpected schema mismatch causes an error.

SchemaFieldNotFoundError

Exception raised when a specified schema field is not found.

ShapeError

Exception raised when trying to perform operations on data structures with incompatible shapes.

StringCacheMismatchError

Exception raised when string caches come from different sources.

StructFieldNotFoundError

Exception raised when a specified Struct field is not found.

TooManyRowsReturnedError

Exception raised when more rows than expected are returned.

UnsuitableSQLError

Exception raised when unsuitable SQL is given to a database method.

Warnings#

PolarsWarning

Base class for all Polars warnings.

CategoricalRemappingWarning

Warning issued when a categorical needs to be remapped to be compatible with another categorical.

ChronoFormatWarning

Warning issued when a chrono format string contains dubious patterns.

CustomUFuncWarning

Warning issued when a custom ufunc is handled differently than numpy ufunc would.

DataOrientationWarning

Warning issued to indicate row orientation was inferred from the inputs.

MapWithoutReturnDtypeWarning

Warning issued when map_elements is performed without specifying the return dtype.

PerformanceWarning

Warning issued to indicate potential performance pitfalls.

PolarsInefficientMapWarning

Warning issued when a potentially slow map_* operation is performed.

UnstableWarning

Warning issued when unstable functionality is used.

Panic#

PanicException

Exception raised when an unexpected state causes a panic in the underlying Rust library.