You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test$with_columns(
pl$col("mpg")$mean()$over(c("cyl", "drat"))
)
#> Error: in $collect(): when calling $collect() on LazyFrame:#> ComputeError(ErrString("The name: 'mpg' passed to `LazyFrame.with_columns` is duplicate\n\nError originated just after this operation:\nDF [\"mpg\", \"cyl\", \"disp\", \"hp\"]; PROJECT */11 COLUMNS; SELECTION: \"None\"")) When calling: #> [TRUNCATED]
This is annoying for example if I have a vector with column names:
vars= c("cyl", "drat")
test$with_columns(
pl$col("mpg")$mean()$over(vars)
)
#> Error: in $collect(): when calling $collect() on LazyFrame:#> ComputeError(ErrString("The name: 'mpg' passed to `LazyFrame.with_columns` is duplicate\n\nError originated just after this operation:\nDF [\"mpg\", \"cyl\", \"disp\", \"hp\"]; PROJECT */11 COLUMNS; SELECTION: \"None\"")) When calling: #> [TRUNCATED]
This behavior is inconsistent with the behavior of other functions like groupby() and select():
Works fine:
A vector of column names is not accepted:
This is annoying for example if I have a vector with column names:
This behavior is inconsistent with the behavior of other functions like
groupby()
andselect()
:Created on 2023-06-30 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: