Groupby - suggestion

I think it would be handy to add IQR to the list of aggregation functions.



Hi Steve,

Isn't the "Quantile" aggregation function what you are looking for? Adjusting its parameter you can obtain first, second and third quartiles.

Hope that helps,


That's fine for one or two columns, but suppose you have hundreds of columns - having to manually do Q3 - Q1 for each one would become tedious. One could perhaps loops through columns, but having it directly as a GroupBy aggregate function would be far more efficient and simpler.

In that case I think I would use Pattern Based or Type Based Aggregation in order to set Q3 - Q1 only once for a large set of columns. I think those options were thought exactly to avoid having manually setting many aggregation rules.


In the GroupBy node, Pattern Based or Type Based Aggregation allows you to do Q1 and Q3, but I see no way to form (Q3 - Q1). You still have do that manually or in some sort of loop.

You can easily calculate the (Q3 -Q1) using the Math Formula (Multi Column) node, without any looping.

1 Like

Thanks, I hadn’t spotted this node, though I ended up just using an R Snippet node.