You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would much rather have the explicit args and kwargs, and that would actually be the pythonic way, but we can't maintain a full copy of pandas and keep it up to date with all the little changes going on there. Hence it would have been much nicer to have GroupBy automatically point to the corresponding methods, without needing to create a GroupBy method for every WeightedDataFrame method that we want to use...
For any anesthetic-own functions I would strive to be explicit, but when it comes to inheritance from pandas, I would try to keep things as independent and robust to changes in pandas as possible.
This exploits the fact that the weighted mean of f by w can be written as <wf>/<w>, where <.> is the unweighted mean. With care, one can write similar expressions for other weighted functions. The advantage of this is that this will forward on all of the other kwargs correctly to the underlying pandas mean function.
This does not resolve the "informative kwargs", but would ensure that we should expect the docstring and signature to be in alignment with the underlying pandas help.
Originally posted by @lukashergt in #272 (comment)
As discussed by @lukashergt and @Ormorod, we ideally would have a more robust and more informative set of
*args, **kwargs
for our weighted functions.The text was updated successfully, but these errors were encountered: