Add a scalar check for fill_value
in shift()
?
#21280
Labels
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
Reproducible example
Log output
Issue description
The behavior of the argument
fill_value
inshift()
is hard to understand whenfill_value
refers to a column. In the example above, nulls created by the shift are filled with the first value ofpl.col("y")
(pre-shifting).Expected behavior
It seems weird to pass
pl.col("y")
to fill values. Shouldn't there be a check thatfill_value
must be a scalar so thatpl.col("y").first()
works butpl.col("y")
doesn't?Installed versions
The text was updated successfully, but these errors were encountered: