Skip to content

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

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

Closed
jreback opened this issue Oct 27, 2016 · 5 comments
Closed
Labels
Enhancement Groupby Resample resample method Window rolling, ewma, expanding

Comments

@jreback
Copy link
Contributor

jreback commented Oct 27, 2016

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.

@jreback jreback added Enhancement Reshaping Concat, Merge/Join, Stack/Unstack, Explode Difficulty Novice Compat pandas objects compatability with Numpy or Python functions labels Oct 27, 2016
@jreback jreback added this to the Next Major Release milestone Oct 27, 2016
@wandersoncferreira
Copy link

@jreback I am willing to work on this problem. I will dig into the tests for this type of mappings shortly! Thanks

@VijayantSoni
Copy link
Contributor

Hi @jreback , I think the link you have added in issue description is no longer valid. If that's the case, can you please update it. I am trying to take this one up.
Thanks !

@chinmoysarangi
Copy link

chinmoysarangi commented Mar 22, 2020

Hi @jreback We are trying to work on this. Hope that's okay.

Thanks in advance! :)
Chinmoy.

@GaurangSharma44
Copy link

Hi @jreback We are trying to work on this. Hope that's okay.

Thanks in advance! :)
Chinmoy.

Take

@mroeschke mroeschke added Groupby Resample resample method Window rolling, ewma, expanding and removed Compat pandas objects compatability with Numpy or Python functions Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Apr 10, 2020
@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
@rhshadrach
Copy link
Member

Closing due to #53974

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Groupby Resample resample method Window rolling, ewma, expanding
Projects
None yet
Development

No branches or pull requests

9 participants