Skip to content

REF: Define methods on resample non-dynamically #50913

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

Merged
merged 4 commits into from
Jan 25, 2023

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke added Refactor Internal refactoring of code Resample resample method labels Jan 20, 2023
@mroeschke mroeschke added this to the 2.0 milestone Jan 24, 2023
@@ -895,6 +895,74 @@ def asfreq(self, fill_value=None):
"""
return self._upsample("asfreq", fill_value=fill_value)

def sum(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no docstring to inherit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For these one that were left out, I couldn't inherit since the associated groupby doc contains numba arguments that are not supported by resample.

*args,
**kwargs,
):
nv.validate_resampler_func("max", args, kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like args/kwargs are getting ignored for many of these. can we just remove them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would require a deprecation cycle like what was done in #50338, but I would be +1 for deprecating *args, **kwargs here

Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mroeschke mroeschke merged commit a82b8e2 into pandas-dev:main Jan 25, 2023
@mroeschke mroeschke deleted the ref/resample/static_methods branch January 25, 2023 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Internal refactoring of code Resample resample method
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REF: Define ops on Resampler as normal methods
2 participants