Skip to content

ENH: add np.nan* functions to map for groupby/rolling/resample aggregators #14518

Closed
@jreback

Description

@jreback

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions