I'm processing data with polars in rust.
I need to filter out some values depend on previous line or item in other columns. I have read the documents but they seem to use internal methods to filter each single value, such as gt()
, is_not_null()
etc.
Here are my needs:
- filter non-monotonically increasing value in a column
- filter a value depend on other values in the same row.
- modify some values in a row depend on some values in current row.
I think I have to apply a closure to generate a boolean value when filtering, but I can't find suitable functions in document. So I want to know how to apply a closure to filter? Are there other methods could meet my needs? Thank in advance.