-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
bugSomething isn't workingSomething isn't workingneeds triageAwaiting prioritization by a maintainerAwaiting prioritization by a maintainerpythonRelated to Python PolarsRelated to Python Polars
Description
Checks
- I have checked that this issue has not already been reported.
- I have confirmed this bug exists on the latest version of Polars.
Issue Description
When comparing temporal to non-temporal types, the message "<x> does not have eq operator" is displayed, which is not a great error message.
import polars as pl
pl.Series([1]).cast(pl.Date) == 1 # or string, or anything else
# NotImplementedError: Series of type Date does not have eq operator
pl.Series([1]).cast(pl.Datetime) == 1
# NotImplementedError: Series of type Datetime(time_unit='us', time_zone=None) does not have eq operator
pl.Series([1]).cast(pl.Duration) == 1
# NotImplementedError: Series of type Duration(time_unit='us') does not have eq operator
pl.Series([1]).cast(pl.Time) == 1
# NotImplementedError: Series of type Time does not have eq operatorAlso for other equality operators.
Installed versions
main
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds triageAwaiting prioritization by a maintainerAwaiting prioritization by a maintainerpythonRelated to Python PolarsRelated to Python Polars