Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom aggregator: weighted average #30

Open
mvcalder-xbk opened this issue Aug 14, 2020 · 1 comment
Open

Custom aggregator: weighted average #30

mvcalder-xbk opened this issue Aug 14, 2020 · 1 comment

Comments

@mvcalder-xbk
Copy link

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

@xhluca
Copy link

xhluca commented Aug 27, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants