-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
pl.<ex-horizontal-operation>()
gives unhelpful duplicate column error
#11060
Comments
Since |
I think the reason is that pl.DataFrame({'a': [1], 'b': [1]}).select(pl.all().alias('c'))
|
pl.sum()
gives wrong duplicate column errorpl.<ex-horizontal-operation>()
gives unhelpful duplicate column error
I encountered this error in my codebase multiple times, all with |
I'm a bit confuse about this, shouldn't the behavior of |
One possible optimization is that when we perform |
Another one I noticed is this df = pl.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]})
df.select(pl.all(pl.all() > 5))
# ValueError: could not convert value 'Unknown' as a Literal |
This would be the desired solution here. Not sure if it's easy to implement though. |
Issue Description
pl.sum()
in this context has been replaced withpl.sum_horizontal
, but this is the wrong error.Expected behavior
pl.sum()
now takes one argument, an expression. If it gets more than one, it should give an error indicating that the API has changed. The current error is incorrect.The text was updated successfully, but these errors were encountered: