the error message that we get in #517 could be more helpful to users that are not experienced with polars.
exceptions.ComputeError: arithmetic on string and numeric not allowed, try an explicit cast first
Description of a solution
We could instead catch that exception and return a new one.
We should discuss if the new exception should have the same type (polars.ComputeError) or have a new type (in pymovements.exceptions). A more helpful error message should then include the name of the column, the transformation method, the actual and the expected type, and should point to datatype casting the particular column or specifying the schema, either in one of the file loading functions like from_csv() or in a dataset definition.
Minimum acceptance criteria
[ ] Message includes transformation method
[ ] Message includes actual and expected type
[ ] Message proposes problem solution by casting datatype column or explicity specifying schema
Description of the problem
the error message that we get in #517 could be more helpful to users that are not experienced with polars.
Description of a solution
We could instead catch that exception and return a new one.
We should discuss if the new exception should have the same type (
polars.ComputeError
) or have a new type (inpymovements.exceptions
). A more helpful error message should then include the name of the column, the transformation method, the actual and the expected type, and should point to datatype casting the particular column or specifying the schema, either in one of the file loading functions like from_csv() or in a dataset definition.Minimum acceptance criteria