Joining on expression can override column value #8874
Labels
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Polars version 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
In the following polars code, I expect that the join condition
pl.col("two_coords").arr.first()
doesn't actually influence the value of any columns in the new dataframe - it should tell polars which row gets which value (IMO?). Instead, it overwrites the column value with the value of that expression.I'm assuming this has something to do with how when using
with_columns
, one will replace the first named column in an expression with the result of that expression.Reproducible example
Expected behavior
df_expected as above, where only the first two rows are kept, with both values intact in
two_coords
.Installed versions
The text was updated successfully, but these errors were encountered: