Closed
Description
xref #14517
here we define mappings for numpy functions when they are used in aggregation functions, e.g.
df.groupby(...).apply(np.mean)
is mapped to df.groupby(..).mean()
these are much more performant when used this way and have more typical pandas semantics.
This issue is about adding the np.nan*
functions (e.g. np.nanmean
) and such.
The only thing tricky is that these must be conditionally added based on numpy version, and need testing! (currently tests for this type of mapping is spread across tests for groupby/rolling/resampling), so tests need to be added in various locations, with a possiblity of moving the common parts of this to a single location.