I’ve been struggling to find a way to calculate the weighted descriptive statistics in JuliaDB using the groupby function. Assuming that “w” is a column of the table DB with sampling weights, I would like to find something like this:

Could you include an example like the above in your JuliaDB tutorial for others to see? I found it extremely helpful and I believe this should be a common question for the ones that work with survey data.

I see that there is an example that you call a column but it wasn’t clear to me that it has general applications.

Good point, I’ll go through the tutorial again shortly as we decided to add it to the official docs, I’ll definitely keep in mind that grouping when needing two columns is a bit tricky so I’ll add an example about that. The “inconvience” is that t.x works on a row to select a field, but not on the table to select a column, and you need column(t, :x). Though in Julia 0.7 we could probably use dot overloading and allow t.x to select a column (if there’s consensus to do that).