add average function
See original GitHub issueIt would be nice to be able to do ds.average()
to compute weighted averages (e.g. for geo data). Of course this would require the axes to be in a predictable order. Or to give a weight per dimension…
Issue Analytics
- State:
- Created 8 years ago
- Comments:23 (17 by maintainers)
Top Results From Across the Web
AVERAGE function - Microsoft Support
Average, which is the arithmetic mean, and is calculated by adding a group of numbers and then dividing by the count of those...
Read more >Calculate the average of a group of numbers - Microsoft Support
Average This is the arithmetic mean, and is calculated by adding a group of numbers and then dividing by the count of those...
Read more >How to Calculate Averages in Excel (7 Simple Ways) - GoSkills
The Excel AVERAGE function is used to generate a number that represents a typical value from a range, distribution, or list of numbers....
Read more >How to Get Average with Excel Formulas - Contextures
The Excel AVERAGE function will calculate the average (arithmetic mean) for a specified set of numbers in an Excel spreadsheet.
Read more >AVERAGE Function - How to Calculate Average in Excel
=AVERAGE(number1, [number2], …) · Number1 (required argument) – This is the first number of a cell reference or a range for which we...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would suggest not using keyword arguments for
weighted
. Instead, just align based on the labels of the argument like regular xarray operations. So we’d writeda.weighted(days_per_month(da.time)).mean()
@MaximilianR has suggested a
groupby
/rolling
-like interface to weighted reductions.I really like this idea, as does @shoyer. I’m going to close my PR in hopes of this becoming reality.