feat: make DataFrame.__eq__
and DataFrame.__neq__
raise, point users towards nw.all
#1484
Labels
DataFrame.__eq__
and DataFrame.__neq__
raise, point users towards nw.all
#1484
For Polars,
df != 0
is equivalent todf.select(pl.all() != 0)
In Narwhals, however, we just return a single scalar
False
:We could match Polars' behaviour here:
__eq__
should doselect(nw.all()==0)
and__neq__
should doselect(nw.all()!=0)
__eq__
and__neq__
should raisebut I think this is a chance to raise an informative error message and push people towards
nw.all
. In the long run, that's the solution that'll get them the furthest, as expressions are composableThe text was updated successfully, but these errors were encountered: