I'm trying to use the nodejs bindings for the polars library to calculate the results of ranked choice elections in a hypothetical space. I was able to get this working through the python bindings here without too much trouble, but it depends on list context features, specifically pl.element(), in order to do some of the calculations. The problem I'm running into is that there does not appear to be an equivalent feature in the nodejs bindings. Is there a different way to talk about the element of a list through the nodejs bindings? Is there a way to do something like this;
lambda loser: pl.col("vote").arr.eval(pl.element().filter(pl.element() != loser)).alias("vote")
without using pl.element()?