Dynamic column selection for Explorer dataframe

Ah, I see, so without mutate_with, pretty much. Nice! that is a bit tidier, thanks! Unfortunately, as you mentioned, it does remove the ability to do things lazily.

Even on eager frames, I’m seeing that mutate_with makes things 3-4x faster, kind of interersting.

r.e. fold, that seems very relevant, although it appears like it requires pretty much the same amount of code as this example uses. I’m thinking more tight function calls (that maybe wrap fold or what we’ve written here). Seems like a type of horizontal aggregation, which maybe it’d be helpful for Explorer to have a small number of. Polars issue tracking horizontal aggregations.