-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: Add test for Expr.is_in()
with Series
input
#1524
Comments
thanks @CangyuanLi for your kind works, and for your report I just tried this on the |
In fact, it also works with 1.15.2 - could you try upgrading your Narwhals version please? |
Oh it does, thanks so much! |
We don't have an explicit test case for this though, it looks like it got fixed as a positive side effect of #1480, good one @FBruzzesi ! Looks like it's because Polars explicitly check for Reopening then as a "needs test" issue The task is, in |
.is_in()
fails when passing in a Polars-backed Narwhals columnExpr.is_in()
with Series
input
Cool to see a nice side effect 😇 |
I'll give this a shot! |
Hi! |
yup! |
Describe the bug
Hi, thanks for the awesome package! I noticed a bug with
.is_in()
when the Narwhals DataFrame is Polars-backed. When.si_in()
is passed a Narwhals Polars-backed Series, it errors withYou can see the behavior in the code below, which shows that it works when passed a list or a Polars Series. The code also shows the same bug does not happen with a Narwhals Pandas-backed Series.
Steps or code to reproduce the bug
Expected results
I expect the Pandas and Polars-backed frames to be the same.
Actual results
ValueError: can only call '.item()' if the Series is of length 1, or an explicit index is provided (Series is of length 3)
Please run narwhals.show_version() and enter the output below.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: