Custom aggregator: weighted average
mvcalder-xbk opened this issue · comments
I would like to implement a weighted average using a fixed column as the weight value. That is, I could specify in advance that I want a specific column to serve as the weight. I am happy to alter the source of either dash-pivottable or react-pivottable but I'm not sure where to begin.
Does someone have a suggestion of how to or an example of implementing custom aggregation functions?
Thanks,
Matt
I think it's better to first fork react-pivottable
and try your experimental feature; if it achieves what you are looking for, you can share it with the Dash community (community.plotly.com) and start a PR in the react-pivottable repo!
As for custom aggregators, I'm not immediately sure if it is exposed in react-pivottable
. A good place to start might be this post, then diving directly into the react-pivottable's source code to locate where the aggregators are defined.